Component decoupling and activation method and system for digital resources

CN116627488BActive Publication Date: 2026-09-22BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310638822.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2026-09-22
Estimated Expiration
2043-06-01

AI Technical Summary

Technical Problem

但通过解析网页元素来控制和获取输出的方式并不适用于C/S架构,C/S架构下的客户端并不能通过解析元件的方式来控制,目前常用的客户端自动化软件大多通过记录元件位置并操纵鼠标/键盘来模拟人的操作

Benefits of technology

[0014]1、本发明公开了一种面向数字资源的组件解耦与活化方法,针对现有代码摘要生成的时序模型对高频词过于依赖,而代码中高频词常常为变量名的特点,使用基于AST检索和NMT转换的高低频关键词融合方法,通过结合检索最相近抽象语义树融合低频词信息,从而生成更准确的函数级代码摘要,并对函数级代码段重新组合为独立的组件级代码段,并生成对应的组件级别代码摘要,弥补了现有技术中只能生成函数级代码摘要的缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116627488B_ABST
    Figure CN116627488B_ABST
Patent Text Reader

Abstract

The application relates to a component decoupling and activation method and system for digital resources, which comprises the following steps: S1: function-level decoupling is carried out according to a user-provided digital resource service program source code to generate a function-level code section with a code abstract; a component-level coupling algorithm is used to generate a component-level code section; and finally, a component abstract is generated through a component abstract generation module; S2: the component-level code section and the component-level abstract are uniformly encapsulated and saved into a component encapsulation database; S3: executable encapsulated components are selected to form an operation flow; S4: the encapsulated components selected by a user are instantiated into a memory; and S5: icon images contained in the components in the operation flow are input into an anti-aspect ratio picture and text recognition neural network, and the output is icon or text box component coordinates; and corresponding operations are sequentially performed on the coordinates in the operation flow order. The method proposed by the application decouples source code resources into functional components with reusability and flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and more specifically to a method and system for decoupling and activating components for digital resources. Background Technology

[0002] Existing computing and display programs or systems serving digital resources often contain a large number of components with similar functions. Reusing these components could significantly reduce development costs and shorten development cycles. However, these digital resource programs are diverse in type and inconsistent in application systems, making it difficult to effectively integrate existing solutions into new systems when new requirements arise.

[0003] Methods for automatically generating summaries, descriptions, or annotations for program source code are called code translation or code summarization, and are currently mainly implemented using recurrent convolutional networks or self-attention networks. However, these methods generate code summaries at the statement or function level. As components are the basic units of code reuse, there is currently a lack of methods to couple function-level summaries to component-level summaries, nor are there methods to automatically decouple code into components.

[0004] Existing digital resource service programs can be presented in two ways: browser / server (B / S) architecture and client / server (C / S) architecture. In the B / S architecture, web pages can be manipulated by parsing web page elements, and the output values ​​can be obtained. This can be achieved using tools such as BeautifulSoap and Selenium. However, controlling and obtaining output by parsing web page elements is not suitable for the C / S architecture. Clients in the C / S architecture cannot be controlled by parsing elements. Currently, most commonly used client automation software simulates human operation by recording element positions and manipulating the mouse / keyboard. To unify the execution methods in C / S and B / S systems, this patent uses visual registration and similarity comparison algorithms to find target elements and manipulates the mouse to simulate human operation to complete the automated execution process, effectively supporting practical application business scenarios. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method and system for decoupling and activating components for digital resources.

[0006] The technical solution of this invention is: a component decoupling and activation method for digital resources, comprising:

[0007] 1. A method for component decoupling and activation for digital resources, characterized in that it includes:

[0008] Step S1: Based on the source code of the digital resource service program provided by the user, perform function-level decoupling and generate a function-level summary for each function in the source code to obtain function-level code segments with code summaries; then, use a component-level coupling algorithm to recombine the function-level code segments that can form components into independent component-level code segments; finally, based on the function-level summaries and the component-level code segments, use the component summary generation module to uniformly encapsulate the components according to their content, input / output types, and characteristics to generate component-level summaries;

[0009] Step S2: Based on the content, input / output types, and attributes of the component-level code segment, uniformly encapsulate the component-level code segment and the component-level summary, and save the encapsulated component to the component encapsulation database;

[0010] Step S3: Select an executable encapsulated component from the component encapsulation database; determine the component based on the keyword matching algorithm. If it matches the framework for automatically extracting execution elements, then a workflow is formed by reading the document, attributes, and methods of the encapsulated component. The workflow includes execution steps and component images of the execution object. If it does not match, then the operation process is recorded using the LOADRUNNER library function, and the operation process is split into workflows. For each step in the workflow, the icon image in the source code is obtained and stored in the workflow.

[0011] Step S4: The user submits an execution request for the operation flow and inputs actual parameters. The corresponding encapsulated component is instantiated in memory, and the execution steps of the encapsulated component and the icon image contained in the component are obtained.

[0012] Step S5: Using a visual positioning application image matching algorithm, input the icon images contained in the components of the operation flow into the inverse aspect ratio image and text recognition neural network, and output the coordinates of the icon or text box component to be operated in the operation flow; and automatically perform corresponding operations on the coordinates in the order of the operation flow.

[0013] Compared with the prior art, the present invention has the following advantages:

[0014] 1. This invention discloses a component decoupling and activation method for digital resources. Addressing the over-reliance on high-frequency words in existing code digest generation time-series models, where high-frequency words in code are often variable names, this invention employs a high-low frequency keyword fusion method based on AST retrieval and NMT transformation. By combining the retrieval of the most similar abstract semantic tree with low-frequency word information, a more accurate function-level code digest is generated. Furthermore, the function-level code segments are recombined into independent component-level code segments, generating corresponding component-level code digests, thus overcoming the limitation of existing technologies that can only generate function-level code digests.

[0015] 2. This invention proposes a visual positioning image matching method and an inverse proportional recognition neural network for different resolutions. Compared with directly recording mouse operation coordinates, this method can be executed more accurately on user systems with different aspect ratios and is more robust to network latency. Furthermore, the two-step search strategy avoids wasted time. Attached Figure Description

[0016] Figure 1 This is a flowchart of a component decoupling and activation method for digital resources according to an embodiment of the present invention;

[0017] Figure 2 This is a schematic diagram of the encoder-decoder neural network structure based on temporal attention in an embodiment of the present invention;

[0018] Figure 3 This is a schematic diagram of the structure of a temporal-attention network block in an embodiment of the present invention;

[0019] Figure 4 This is a schematic diagram of the inverse aspect ratio image frame and text recognition neural network structure in an embodiment of the present invention;

[0020] Figure 5 This is a structural block diagram of a component decoupling and activation system for digital resources according to an embodiment of the present invention. Detailed Implementation

[0021] This invention provides a component decoupling and activation method for digital resources. It utilizes digital resource component activation technology to decouple source code resources into reusable and flexible functional components, and solves the problem of difficulty in effective aggregation and sharing caused by the heterogeneity of application systems between different programs, thereby promoting data fusion and technology fusion in urban services.

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below through specific implementations and in conjunction with the accompanying drawings.

[0023] Example 1

[0024] like Figure 1 As shown in the figure, an embodiment of the present invention provides a component decoupling and activation method for digital resources, comprising the following steps:

[0025] Step S1: Based on the source code of the digital resource service program provided by the user, perform function-level decoupling and generate a function-level summary for each function in the source code, thereby obtaining function-level code segments with code summaries; then use the component-level coupling algorithm to recombine the function-level code segments that can form components into independent component-level code segments; finally, based on the function-level summaries and component-level code segments, the component summary generation module uniformly encapsulates the components according to their content, input / output types, and characteristics, generating a component-level summary;

[0026] Step S2: Based on the content, input / output types, and attributes of the component-level code segment, uniformly encapsulate the component-level code segment and component-level summary, and save the encapsulated component to the component encapsulation database;

[0027] Step S3: Select executable encapsulated components from the component encapsulation database; judge based on keyword matching algorithm. If it meets the framework for automatically extracting execution elements, then form an operation flow by reading the document, attributes, and methods of the encapsulated component. The operation flow includes: execution steps and component images of the execution object; if it does not meet the criteria, record the operation process using the LOADRUNNER library function, break the operation process into operation flows, and for each step in the operation flow, obtain the icon image from the source code and store it in the operation flow.

[0028] Step S4: The user submits an execution request for the operation flow and inputs actual parameters. The corresponding encapsulated component is instantiated into memory, and the execution steps of the encapsulated component and the icon image contained in the component are obtained.

[0029] Step S5: Using a visual positioning application image matching algorithm, input the icon images contained in the components in the operation flow into the inverse aspect ratio image and text recognition neural network, and output the coordinates of the icon or text box components to be operated in the operation flow; and automatically perform the corresponding operations on the coordinates in the order of the operation flow.

[0030] In one embodiment, in step S1 above, function-level decoupling is performed based on the source code of the digital resource service program provided by the user, and a function-level summary is generated for each function in the source code, thereby obtaining a function-level code segment with a code summary, specifically including:

[0031] Step S101: Transform the digital resource service program source code into a vector representation using a bag-of-words model embedding layer: Construct a vocabulary list based on the words in the digital resource service program source code, calculate the word frequency of each word in the source code, use the position of each word in the vocabulary list as the dimension of the vector, and the word frequency as the value of the vector, to construct a vector sequence n = {n1, n2, ..., n} of the digital resource service program source code. j}, n j∈[0,1] |N| , where N is the number of natural language corpora;

[0032] Step S102: Input the vector sequence into the encoder of the encoder-decoder neural network based on temporal attention, wherein the encoder includes multiple temporal attention network blocks;

[0033] like Figure 2 The diagram shown is a schematic of an encoder-decoder neural network structure based on temporal attention.

[0034] like Figure 3 In the temporal attention network block shown, the vector sequence n at the current time t is... t and the hidden state sequence h from the previous time step t-1 After passing through the first fully connected layer (FC), we obtain the influence factor η of the previous time step on the current time step. t , will η t Compared with the previous time-series state vector c t-1 Multiplying yields the time-series state correction θ. t At the same time, n t and h t-1 The input state index is obtained after passing through a second fully connected layer (FC). Use the activation function tanh on n t After nonlinearization and Multiply to obtain the current timing input correction φ t ; θ t With φ t Add them together to obtain the current time sequence state c. t ; will c t After nonlinearization by the activation function tanh, and with n t The computational result α of one-dimensional convolution and attention mechanism t Multiplying them together yields the hidden state sequence h of the current time series. t ;

[0035] The hidden state sequence h of the current time series t and timing state c t The calculation is performed using the following formula:

[0036] η t =W hη ·h t-1 +W nη ·n t +b η

[0037] θ t =η t ·c t-1

[0038]

[0039]

[0040] c t =φ t +θ t

[0041] h t =α t ·tanh(c t )

[0042] Among them, W __ and b _ Indicates the parameters to be trained;

[0043] The attention mechanism is calculated using the following formula:

[0044]

[0045]

[0046] Among them, W attn It is a one-dimensional convolution sum, W _attn This represents the matrix to be trained in the attention calculation, * indicates the convolution operation, and l is the length of the vector sequence;

[0047] The output of the last temporal-attention network block in the encoder is the temporal state represented by the code C;

[0048] Finally, the code encoding representation is input into the decoder network, and the probability of the natural language summary of the code statement is generated by calculating the product of the conditional probabilities of the next word. This generates the natural language summary y = {y1, ..., y...}. l′};

[0049]

[0050] Among them, y i l' represents the i-th word in the generated summary; l' is... summary Length;

[0051] The above steps can yield a direct natural language summary of the source code fragment; this process is called NMT transformation.

[0052] Step S103: Generate an Abstract Syntax Tree (AST) from the source code of the digital resource service program;

[0053] Step S104: Retrieve the server code AST dataset and obtain the similar code segment with the smallest cosine distance to the AST. At this time, the differences in low-frequency words in the similar code segment have a greater weight on the cosine distance.

[0054] Step S105: Input similar code segments into an encoder-decoder neural network model based on temporal attention to obtain the encoder output C'; merge C and C' and input them into the decoder. C is more sensitive to high-frequency words in the source code of the digital resource service program, while C' has added weights for low-frequency words in similar code segments. Finally, the decoder outputs a function-level summary with balanced fusion of high and low frequency keywords.

[0055] This invention generates a function-level summary that fuses high and low frequency keywords through AST retrieval and NMT transformation, which can accurately describe the effect of the function or method.

[0056] In one embodiment, step S1 above utilizes a component-level coupling algorithm to recombine function-level code segments that can form components into independent component-level code segments, specifically including:

[0057] Step S111: Determine the frame type used by the digital resource service program based on the syntax and keywords in its source code;

[0058] For example, based on the source code of the digital resource service program, it can be determined whether it uses the React framework, the Element UI framework, the Vue.js framework, or other frameworks;

[0059] Step S112: Check whether the function-level code segment conforms to the component structure according to the component structure of the framework type;

[0060] For example, React components need to inherit from React.Component and implement the render method, while Vue.js components need to define a template or render function, etc.

[0061] Step S113: Parse the component's properties according to the component property definition method of the framework type;

[0062] For example, React component properties are typically defined using the `props` keyword, while Vue.js component properties are typically defined using the `props` property.

[0063] Step S114: Parse out the component's methods according to the component method definition method of the framework type;

[0064] For example, React component methods are usually defined in the class, while Vue.js component methods are usually defined in the methods property;

[0065] Step S115: Parse the component's events according to the component event definition method of the framework type;

[0066] For example, the state of React components is usually defined using the `state` property, while the state of Vue.js components is usually defined using the `data` property;

[0067] Step S116: Parse the component's state according to the component state definition method of the framework type;

[0068] For example, the state of React components is usually defined using the `state` property, while the state of Vue.js components is usually defined using the `data` property;

[0069] Step S117: Based on the component lifecycle definition method of the framework type, parse out the component lifecycle and perform unified processing;

[0070] For example, React component lifecycle methods are usually defined with the prefix "component", while Vue.js component lifecycle methods are usually defined with the prefix "before" or "after".

[0071] The embodiments of the present invention use a component-level coupling module algorithm to couple function-level code digests into component-level code. By parsing and combining functions or methods, independent component code segments are separated from the overall code.

[0072] Finally, based on the function-level summary and component-level code snippets, the component summary generation module uniformly encapsulates the components according to their content, input / output types, and characteristics, generating a component-level summary.

[0073] This invention addresses the issue that existing time-series models for code summarization rely too heavily on high-frequency words, which are often variable names in code. It employs a high-low frequency keyword fusion method based on AST retrieval and NMT transformation. By combining the retrieval of the most similar abstract semantic tree with low-frequency word information, a more accurate function-level code summary is generated. Furthermore, the function-level code segments are recombined into independent component-level code segments, and corresponding component-level code summaries are generated, thus overcoming the limitation of existing technologies that can only generate function-level code summaries.

[0074] In one embodiment, step S2 above involves uniformly encapsulating the component-level code segment and component-level summary based on the content, input / output types, and attributes of the component-level code segment, and saving the encapsulated component to the component encapsulation database.

[0075] Based on the component-level code segments and their corresponding component-level summaries generated in step S1, and according to the component's content, input / output types, and inherent characteristics, the components are uniformly encapsulated and saved to the component encapsulation database. By encapsulating components, all decoupled components can have a unified interface description. The encapsulated components expose only the information necessary for component calls, while the specific internal structure of the component remains hidden.

[0076] In one embodiment, step S3 above involves selecting executable encapsulated components from the component encapsulation database; judging based on a keyword matching algorithm; if it conforms to the framework for automatically extracting execution elements, then an operation flow is formed by comprehensively reading the document, attributes, and methods of the encapsulated component. The operation flow includes execution steps and component images of the execution object; if it does not conform, then the operation process is recorded using the LOADRUNNER library function, and the operation process is split into operation flows. For each step in the operation flow, the icon image in the source code is obtained and stored in the operation flow.

[0077] After selecting a component from the component encapsulation database, perform the following steps:

[0078] (1) First determine the type of component. If the component uses common React, ElementUI and Vue frameworks, proceed to step (3); if the component uses other frameworks, proceed to step (2).

[0079] (2) The system records the user's operations on the components, parses the operations into component atomic operations such as mouse clicks, keyboard input, mouse movement, scroll wheel scrolling, and icon positioning, and stores them in the execution element database;

[0080] (3) Examine the component's documentation and extract the execution elements from the documentation using a named entity recognition algorithm. For operations, determine their names and descriptions by searching for verbs and adjectives in the component's documentation. For example, if the documentation contains verbs such as "click" or "click", then determine the name of the operation as "click".

[0081] An operation flow is formed based on the dependencies of the execution elements in the document. If the document reading fails, proceed to step (5);

[0082] (4) Examine the component's properties, match the properties that specify user actions, and form an action flow based on dependencies. For example, based on the component framework category, match the "onClick", "@click", and "@click" properties, which specify the method to be executed when the button is clicked;

[0083] (5) Examine the component's properties, match the properties that specify user actions, and form an action flow based on dependencies. For example, based on the component framework category, match the "onClick", "@click", and "@click" properties respectively, which specify the method to be executed when the button is clicked;

[0084] (6) For web-based components, use the requests library to request the webpage content at the specified URL, and then use the BeautifulSoup library to parse the HTML document. Iterate through all the HTML documents... The program retrieves the link to each image from the tags. If the link is a relative path, it converts it to an absolute path. Finally, the program uses the requests library to download each image and saves it to the specified folder. For client-side components, the program locates PNG, ICO, and SVG format resource files in the program code and uses the icoextract tool to extract icons from the ICO files. The program records the corresponding images for each execution element in the workflow, such as the icons to be clicked, and saves them in a dictionary data structure.

[0085] In one embodiment, step S4 above: the user submits an execution request for the operation flow and inputs actual parameters, instantiates the corresponding encapsulated component into memory, and obtains the execution steps of the encapsulated component and the icon image contained in the component;

[0086] When a user requests the execution of an operation flow, the corresponding encapsulated component information is read from the component encapsulation database, including: attributes, parameters, input and output interfaces, and the actual parameters passed in by the user are received.

[0087] Create an instance of the encapsulated component and allocate resources to that instance;

[0088] Initialize the encapsulated component, including setting the component's initial state and initializing the component's internal data structure.

[0089] In one embodiment, step S5 above involves using a visual positioning application image matching algorithm to input the icon images contained in the components of the operation flow into an inverse aspect ratio image and text recognition neural network, outputting the coordinates of the icon or text box components to be operated on in the operation flow; and automatically performing corresponding operations on the coordinates sequentially according to the operation flow order, specifically including:

[0090] Step S51: Input the component execution steps and the icon images contained in the corresponding components in the operation flow, wherein the execution steps consist of component atomic operations: mouse click, keyboard input, mouse movement, scroll wheel scrolling, and icon positioning;

[0091] Step S52: Construct an inverse aspect ratio image bounding box and text recognition neural network. The input page image to be operated on is reset to 224*224 size. After passing through an 18-layer Res-Net backbone network, a 32*32 high-dimensional feature map is obtained. The high-dimensional feature map is subjected to an inverse aspect ratio transformation to obtain three feature maps with aspect ratios of 3:4, 9:16, and 10:16 respectively. 8*8, 16*16 and 1*2, 1*5, 1*8 anchor boxes are used for each feature map. The classification score and regression score are calculated for each anchor box. Finally, the target component image and its coordinates, as well as the text content of the target component, are identified in the page image to be operated on through a multi-task loss function.

[0092] like Figure 4 The image shown is a schematic diagram of an inverse aspect ratio picture frame and a text recognition neural network structure.

[0093] Step S53: Obtain the coordinates of the target component image and the text content, and construct a dictionary to store the image, text, and location;

[0094] Step S54: Check if the image box position coordinates of the target component have been cached in the dictionary. If the cached coordinates are found, proceed to step S55; otherwise, proceed to step S56.

[0095] Step S55: Search for the icon in the area near the cached coordinates. If the image is found, return its coordinates and update the icon coordinates in the dictionary. Proceed to step S57; otherwise, proceed to step S56.

[0096] Step S56: Re-enter the target image query on the user page. If the target image is found, return its coordinates and update the image coordinates in the dictionary; if not found, return a message indicating that the image was not found and wait for the user's next action.

[0097] Step S57: Send the target image coordinates and operation flow from the page to be operated to the concurrency control module, which will then execute the actual operation. This includes the following steps:

[0098] (1) Identify concurrent operations and classify data objects as shared, private, read-only, and modifiable in read-write situations;

[0099] (2) Select appropriate concurrency control strategies, which are divided into locking, timestamp, and optimistic locking, etc.

[0100] (3) Implement control mechanisms according to the strategy, including locking, checking version numbers, rolling back transactions, etc.

[0101] (4) Monitor the execution of concurrent operations, including logging, detecting deadlocks, and optimizing performance.

[0102] This invention proposes a visual positioning image matching algorithm and a neural network for recognizing images and text with different aspect ratios. Compared with directly recording mouse operation coordinates, this algorithm can be executed more accurately on user systems with different aspect ratios and is more robust to network latency. Furthermore, the two-step search strategy avoids wasted time.

[0103] Example 2

[0104] like Figure 5 As shown, this embodiment of the invention provides a component decoupling and activation system for digital resources, including the following modules:

[0105] The component decoupling module is used to generate function-level code segments, component-level code segments, and component-level summaries with code digests from the input digital resource service program source code. It includes the following modules:

[0106] Function-level decoupling module: Used to perform function-level decoupling based on the source code of the digital resource service program provided by the user, generating a function-level summary for each function in the source code, thereby obtaining a function-level code segment with a code summary;

[0107] Component-level coupling module: The component-level coupling algorithm is used to recombine function-level code segments that can form components into independent component-level code segments;

[0108] Component summary generation module: Based on function-level summaries and component-level code segments, the component summary generation module uniformly encapsulates the components according to their content, input / output types, and characteristics, generating component-level summaries;

[0109] The component encapsulation module is used to encapsulate component-level code segments and component-level summaries in a unified manner based on the content, input and output types, and attributes of the component-level code segments, and save the encapsulated components to the component encapsulation database.

[0110] The execution element extraction module is used to select executable encapsulated components from the component encapsulation database. It judges whether the component matches the framework for automatically extracting execution elements based on a keyword matching algorithm. If it does, it forms an operation flow by reading the encapsulated component's documentation, attributes, and methods. The operation flow includes execution steps and the component image of the execution object. If it does not match, it records the operation process using the LOADRUNNER library function, breaks the operation process down into operation flows, and for each step in the operation flow, retrieves the icon image from the source code and stores it in the operation flow.

[0111] The component instantiation module is used by users to submit execution requests for operation flows and input actual parameters. It instantiates the corresponding encapsulated components into memory and obtains the execution steps of the encapsulated components and the icon images contained in the components.

[0112] The operation execution module uses a visual positioning application image matching algorithm to input the icon images contained in the components of the operation flow into an inverse aspect ratio image and text recognition neural network, and outputs the coordinates of the icon or text box components to be operated in the operation flow; and automatically performs the corresponding operations on the coordinates in the order of the operation flow.

[0113] The above embodiments are provided merely for the purpose of describing the present invention and are not intended to limit the scope of the invention. The scope of the invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the invention should be covered within the scope of the invention.

Claims

1. A method for component decoupling and activation for digital resources, characterized in that, include: Step S1: Based on the source code of the digital resource service program provided by the user, perform function-level decoupling and generate a function-level summary for each function in the source code to obtain function-level code segments with code summaries; then, use a component-level coupling algorithm to recombine the function-level code segments that can form components into independent component-level code segments; finally, based on the function-level summaries and the component-level code segments, use the component summary generation module to uniformly encapsulate the components according to their content, input / output types, and characteristics to generate component-level summaries; Step S2: Based on the content, input / output types, and attributes of the component-level code segment, uniformly encapsulate the component-level code segment and the component-level summary, and save the encapsulated component to the component encapsulation database; Step S3: Select an executable encapsulated component from the component encapsulation database; determine the component based on the keyword matching algorithm. If it matches the framework for automatically extracting execution elements, then a workflow is formed by reading the document, attributes, and methods of the encapsulated component. The workflow includes execution steps and component images of the execution object. If it does not match, then the operation process is recorded using the LOADRUNNER library function, and the operation process is split into workflows. For each step in the workflow, the icon image in the source code is obtained and stored in the workflow. Step S4: The user submits an execution request for the operation flow and inputs actual parameters. The corresponding encapsulated component is instantiated in memory, and the execution steps of the encapsulated component and the icon image contained in the component are obtained. Step S5: Using a visual positioning application image matching algorithm, input the icon images contained in the components of the operation flow into the inverse aspect ratio image and text recognition neural network, and output the coordinates of the icon or text box component to be operated in the operation flow; and automatically perform corresponding operations on the coordinates in the order of the operation flow.

2. The component decoupling and activation method for digital resources according to claim 1, characterized in that, In step S1, function-level decoupling is performed based on the source code of the digital resource service program provided by the user. A function-level summary is generated for each function in the source code, thereby obtaining a function-level code segment with a code summary. Specifically, this includes: Step S101: Transform the digital resource service program source code into a vector representation using a bag-of-words model embedding layer: Construct a vocabulary list based on the words in the digital resource service program source code, calculate the word frequency of each word in the digital resource service program source code, use the position of each word in the vocabulary list as the dimension of the vector, and use the word frequency as the value of the vector to construct a vector sequence n = {n1, n2, ..., n} of the digital resource service program source code. j }, n j ∈[0,1] |N| , where N is the number of natural language corpora; Step S102: Input the vector sequence into the encoder of the encoder-decoder neural network based on temporal attention, wherein the encoder includes multiple temporal attention network blocks; In the time-attention network block, the vector sequence n at the current time t is... t and the hidden state sequence h from the previous time step t-1 After passing through a fully connected layer, we obtain the influence factor η of the previous time step on the current time step. t , will η t Compared with the previous time-series state vector c t-1 Multiplying yields the time-series state correction θ. t At the same time, n t and h t-1 The input state index is obtained after passing through the second fully connected layer. Use the activation function on n t After nonlinearization and Multiply to obtain the current timing input correction φ t ; θ t With φ t Add them together to obtain the current time sequence state c. t ; will c t After nonlinearization by activation function and n t The computational result α of one-dimensional convolution and attention mechanism t Multiplying them together yields the hidden state sequence h of the current time series. t ; The hidden state sequence h of the current time series t and timing state c t The calculation is performed using the following formula: η t =W hη ·h t-1 +W nη ·n t +b η i t =the t ·c t-1 c t =φ t +θ t h t =α t ·tanh(c t ) Where W__ and b_ represent the parameters to be trained; The attention mechanism is calculated using the following formula: Among them, W attn It is a one-dimensional convolution sum, W _attn This represents the matrix to be trained in the attention calculation, * represents the convolution operation, and l is the length of the vector sequence; The output of the last temporal-attention network block in the encoder is a temporal state code representation C; Finally, the code encoding representation is input into the decoder network, and the probability of the natural language summary of the code statement is generated by calculating the product of the conditional probabilities of the next word. This generates a natural language summary y = {y1, ..., y2}. l′ }; Among them, y i l' represents the i-th word in the generated summary; l' is... summary Length; The above steps can yield a direct natural language summary of the source code fragment; this process is called NMT transformation. Step S103: Generate an Abstract Syntax Tree (AST) from the source code of the digital resource service program; Step S104: Retrieve the server code AST dataset and obtain the similar code segment with the smallest cosine distance to the AST. At this time, the differences in low-frequency words in the similar code segment have a greater weight on the cosine distance. Step S105: Input the similar code segment into the encoder-decoder neural network model based on temporal attention to obtain the encoder output C. ‘ ; with C and C ‘ The merged input is then fed into the decoder, where C is more sensitive to high-frequency words in the source code of the digital resource service program, while C... ‘ The weight of low-frequency words in the similar code segments is increased, and the decoder finally outputs a function-level summary that balances the fusion of high and low frequency keywords.

3. The component decoupling and activation method for digital resources according to claim 1, characterized in that, In step S1, the component-level coupling algorithm is used to recombine the function-level code segments that can form components into independent component-level code segments, specifically including: Step S111: Determine the frame type used by the digital resource service program based on the syntax and keywords in its source code; Step S112: Check whether the function-level code segment conforms to the component structure according to the component structure of the frame type; Step S113: Parse the component attributes according to the component attribute definition method of the frame type; Step S114: Parse the component's methods according to the component method definition method of the framework type; Step S115: Parse the component's events according to the component event definition method of the frame type; Step S116: Parse the component state according to the component state definition method of the frame type; Step S117: Based on the component lifecycle definition method of the framework type, parse out the component lifecycle and perform unified processing.

4. The component decoupling and activation method for digital resources according to claim 1, characterized in that, Step S5: Using a visual positioning application image matching algorithm, the icon images contained in the components of the operation flow are input into the inverse aspect ratio image and text recognition neural network, and the output is the coordinates of the icon or text box component to be operated in the operation flow; And automatically perform corresponding operations on the coordinates sequentially according to the operation flow order, specifically including: Step S51: Input the component execution steps and the icon images contained in the corresponding components in the operation flow, wherein the execution steps are composed of component atomic operations: mouse click, keyboard input, mouse movement, scroll wheel scrolling, and icon positioning; Step S52: Construct an inverse aspect ratio image bounding box and text recognition neural network. The input page image to be operated on is reset to 224*224 size. After passing through an 18-layer Res-Net backbone network, a high-dimensional feature map of size 32*32 is obtained. The high-dimensional feature map is subjected to an inverse aspect ratio transformation to obtain three feature maps with aspect ratios of 3:4, 9:16, and 10:16, respectively. 8*8, 16*16 and 1*2, 1*5, 1*8 anchor boxes are used for each feature map. The classification score and regression score are calculated for each anchor box. Finally, the target component image and its coordinates, as well as the text content of the target component, are identified in the page image to be operated on through a multi-task loss function. Step S53: Obtain the coordinates of the target component image and the text content, and construct a dictionary to store the image, text, and location; Step S54: Query whether the image frame position coordinates of the target component have been cached in the dictionary. If the cached coordinates are found, proceed to step S55; otherwise, proceed to step S56. Step S55: Search for the icon in the vicinity of the cached coordinates. If the image is found, return its coordinates and update the icon coordinates in the dictionary, then proceed to step S57; otherwise, proceed to step S56. Step S56: Re-query the target image on the page to be operated on using step S52. If the target image is found, return its coordinates and update the image coordinates in the dictionary; if not found, return a message indicating that no image was found and wait for the user's next operation. Step S57: Send the target image coordinates and the operation flow from the page to be operated to the concurrency control module, which will then execute the actual operation.

5. A component decoupling and activation system for digital resources, characterized in that, Includes the following modules: The component decoupling module is used to perform function-level decoupling based on the source code of the digital resource service program provided by the user, generating a function-level summary for each function in the source code, thereby obtaining function-level code segments with code summaries; then, the component-level coupling algorithm is used to recombine the function-level code segments that can form components into independent component-level code segments; finally, based on the function-level summaries and the component-level code segments, the component summary generation module performs unified encapsulation of the components according to the component content, input and output types, and characteristics of the components themselves, generating a component-level summary; The component encapsulation module is used to uniformly encapsulate the component-level code segment and the component-level summary according to the content, input and output types and their attributes, and save the encapsulated component to the component encapsulation database. The execution element extraction module is used to select executable encapsulated components from the component encapsulation database; it judges based on a keyword matching algorithm, and if it meets the framework for automatically extracting execution elements, it forms an operation flow by reading the document, attributes, and methods of the encapsulated component. The operation flow includes execution steps and component images of the execution object; if it does not meet the criteria, it records the operation process using the LOADRUNNER library function, breaks the operation process into operation flows, and for each step in the operation flow, it obtains the icon image from the source code and stores it in the operation flow. The component instantiation module is used by the user to submit an execution request for the operation flow and input actual parameters, instantiate the corresponding encapsulated component into memory, and obtain the execution steps of the encapsulated component and the icon image contained in the component; The operation execution module is used to use a visual positioning application image matching algorithm to input the icon images contained in the components of the operation flow into an inverse aspect ratio image and text recognition neural network, and output the coordinates of the icon or text box components to be operated in the operation flow; and automatically perform corresponding operations on the coordinates in the order of the operation flow.