Text file change monitoring method, system, equipment and medium

By constructing a dependency graph and using content identification, the system automatically identifies and filters out changes to text files, solving the problem that code repositories cannot track changes to external resources, improving monitoring efficiency and reducing maintenance costs.

CN120994622APending Publication Date: 2025-11-21MALANSHAN AUDIO & VIDEO LABORATORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511035655.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

The existing code repository cannot effectively track changes to external resources in text files, resulting in high maintenance costs.

Method used

By constructing a dependency graph, the system identifies the hierarchical relationship between text files and resource paths, uses content identifiers and library identifiers to determine changes, and automatically filters out files whose text content has been changed.

Benefits of technology

It enables automatic identification of the impact of external resource changes on text files, improving monitoring efficiency and reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994622A_ABST
    Figure CN120994622A_ABST
Patent Text Reader

Abstract

The invention provides a text file change monitoring method, system and device and a medium, and relates to the field of data management.The method comprises the steps that all text files in a target warehouse are traversed in a current monitoring period, and a plurality of resource paths and the subordination relation between all the resource paths and all the text files are obtained; obtaining a plurality of content identifiers, wherein the content identifiers are determined according to target resources under the resource path; constructing a dependency graph of the target warehouse according to each resource path, each content identifier and each affiliation; if the warehouse identifier of the target warehouse meets a preset identifier condition, determining a target resource path according to the dependency graph and a historical dependency graph; obtaining at least one associated text file from the dependency graph or the historical dependency graph; and screening out a target text file from the at least one associated text file. According to the invention, the monitoring efficiency is improved, and the maintenance cost of the target warehouse is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of data management, in particular to a text file change monitoring method, system, device and medium. BACKGROUND

[0002] Text files (MD, Markdown) often reference external resources such as images, code snippets or other text files, etc. When the external resources change, the content of the text file has actually changed, but the code repository (Git) used to store the text file cannot perceive this indirect change. The code repository in the prior art only focuses on the hash value (Blob-Object-Id) of the text file itself, and cannot track changes in external resources. When the code repository is large, the maintenance cost is high. SUMMARY

[0003] Therefore, the purpose of the present application is to overcome the deficiencies in the prior art and provide a text file change monitoring method, system, device and medium. The present application provides the following technical solutions: In a first aspect, the present application provides a text file change monitoring method, comprising: traversing each text file in a target repository in a current monitoring period, obtaining a plurality of resource paths included in each text file, and determining the dependency relationship between each resource path and each text file; respectively obtaining the content identifier of each resource path, the content identifier being determined according to the target resource under the resource path; constructing a dependency graph of the target repository according to each resource path, each content identifier, and each dependency relationship; obtaining a library identifier of the target repository, determining whether the library identifier satisfies a preset identifier condition, and if so, determining a target resource path according to the dependency graph and a historical dependency graph, the historical dependency graph being the dependency graph of the target repository in the last monitoring period; obtaining at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; selecting a target text file from at least one associated text file according to a preset filtering rule, the target text file being the associated text file whose text content has changed.

[0004] In an optional embodiment, the dependency graph of the target repository is constructed according to each resource path, each content identifier, and each dependency relationship, comprising: Each of the resource paths is determined as a resource node, and each of the content identifiers is determined as attribute information of the resource node, the content identifier corresponding to the resource node corresponding to the same resource path; Each of the text files is determined as a text node. Each of the dependency relationships is determined as a directed edge. The dependency relationship graph of the target repository is determined according to the resource nodes, the attribute information corresponding to the resource nodes, and the directed edges.

[0005] In an optional implementation, the determining whether the library identifier satisfies a preset identifier condition comprises: The library identifier is compared with a historical library identifier, the historical library identifier being a library identifier of the target repository obtained in a previous monitoring period; If the library identifier is different from the historical library identifier, it is determined that the library identifier satisfies the preset identifier condition.

[0006] In an optional implementation, the determining a target resource path according to the dependency relationship graph and a historical dependency relationship graph comprises: The dependency relationship graph and the historical dependency relationship graph are compared to obtain a structural difference between the dependency relationship graph and the historical dependency relationship graph, the structural difference including a difference between attribute information of each resource node in the dependency relationship graph and attribute information of a corresponding resource node in the historical dependency relationship graph, or a difference between directed edges in the dependency relationship graph and directed edges in the historical dependency relationship graph; The target resource path is determined according to the structural difference. In an optional implementation, the filtering a target text file from at least one of the associated text files according to a preset filtering rule comprises: A text identifier of the associated text file is determined, and if the text identifier of the associated text file is different from a historical text identifier of the associated text file, the associated text file is determined as the target text file, the historical text identifier being a text identifier of the associated text file in a previous monitoring period.

[0007] In an optional implementation, the filtering a target text file from at least one of the associated text files according to a preset filtering rule comprises: A content identifier of the target resource path is obtained, and if the content identifier of the target resource path is different from a historical content identifier of the target resource path, the associated text file associated with the target resource path is determined as the target text file, the historical content identifier being a content identifier of the target resource path in a previous monitoring period.

[0008] In an optional embodiment, the method further comprises: generating update prompt information according to each target text file, the update prompt information being used to prompt updating a text identifier of each target text file.

[0009] In a second aspect, the present application provides a text file change monitoring system, the system comprising: a first obtaining module, configured to traverse each text file in a target repository in a current monitoring period, obtain a plurality of resource paths respectively included in each text file, and determine a dependency relationship between each resource path and each text file; a second obtaining module, configured to respectively obtain a content identifier of each resource path, the content identifier being determined according to a target resource under the resource path; a constructing module, configured to construct a dependency graph of the target repository according to each resource path, each content identifier, and each dependency relationship; a determining module, configured to obtain a library identifier of the target repository, judge whether the library identifier satisfies a preset identifier condition, and if so, determine a target resource path according to the dependency graph and a historical dependency graph of the target repository, the historical dependency graph being the dependency graph of the target repository in a previous monitoring period; a third obtaining module, configured to obtain at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; a text determining module, configured to filter out a target text file from the at least one associated text file according to a preset filtering rule, the target text file being the associated text file in which a text content has changed.

[0010] In a third aspect, the present application provides an electronic device comprising a memory and a processor, the memory storing a computer program, the computer program being executed on the processor to implement the text file change monitoring method in any one of the preceding embodiments. In a fourth aspect, the present application provides a computer readable storage medium storing a computer program, the computer program being executed on a processor to implement the text file change monitoring method in any one of the preceding embodiments.

[0011] The application provides a text file change monitoring method, system, device and medium. The method comprises the following steps: traversing each text file in a target warehouse in a current monitoring period, obtaining a plurality of resource paths included in each text file respectively, and determining the dependency relationship between each resource path and each text file; obtaining the content identifier of each resource path respectively, wherein the content identifier is determined according to a target resource under the resource path; constructing a dependency graph of the target warehouse according to each resource path, each content identifier and each dependency relationship; obtaining the library identifier of the target warehouse, judging whether the library identifier meets a preset identifier condition, if yes, determining a target resource path according to the dependency graph and a historical dependency graph, wherein the historical dependency graph is the dependency graph of the target warehouse in a previous monitoring period; obtaining at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; and screening a target text file from at least one associated text file according to a preset filtering rule, wherein the target text file is the associated text file whose text content has changed, so as to automatically identify the influence of external resource change on the text file, automatically trigger the update of the affected text file, improve the monitoring efficiency and reduce the maintenance cost of the target warehouse.

[0012] In order to make the above objectives, features and advantages of the present application more apparent and easy to understand, the following preferred embodiments are specifically described below with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as a limitation to the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0014] Figure 1 Fig. 1 shows a flowchart of a text file change monitoring method provided by an embodiment of the present application; Figure 2 Fig. 2 shows another flowchart of a text file change monitoring method provided by an embodiment of the present application; Figure 3 Fig. 3 shows a structural diagram of a text file change monitoring system provided by an embodiment of the present application; Figure 4 Fig. 4 shows a structural diagram of an electronic device provided by an embodiment of the present application.

[0015] Main element symbol explanation: 300-text file change monitoring system; 310-first obtaining module; 320-second obtaining module; 330-constructing module; 340-determining module; 350-third obtaining module; 360-text determining module; 400-electronic device; 401-transceiver; 402-processor; 403-memory. DETAILED DESCRIPTION

[0016] Embodiments of the present application are described in detail below with reference to examples illustrated in the accompanying drawings, in which the same or similar components have the same or similar designations throughout the various figures and identical or similar components have the same or similar reference characters. The embodiments described below are examples only, and are not intended to limit the present application.

[0017] In addition, the terms "first", "second", etc. are used only for descriptive purposes and are not to be construed as indicating or implying relative importance or an indicated number of technical features. Thus, features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly and specifically limited.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the template herein is only for the purpose of describing specific embodiments and is not intended to limit the present application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0019] Embodiment 1 The embodiments of the present application provide a text file change monitoring method, please refer to Figure 1 , the method comprises steps S110-S160.

[0020] Step S110, traversing each text file in the target repository in the current monitoring period, obtaining a plurality of resource paths included in each text file, and determining the dependency relationship between each resource path and each text file.

[0021] In this embodiment, the target repository is used to store at least one text file, each text file is traversed to obtain the resource path referenced in each text file, such as image path, code path or link of other text file, etc., and it is clear that each resource path is referenced by which text file, the dependency relationship between the text file and the resource path referenced by it is established, for example: README.md file references assets / logo.png image.

[0022] It should be noted that in the process of traversing the text file, the resource type of the target resource under the resource path referenced by the text file can be determined according to the link syntax obtained by traversal, for example, according to![image](path / to / image.png), it can be determined that the resource type is image picture, and the resource path path / to / image.png is extracted.

[0023] In step S120, the content identifier of each resource path is obtained respectively, and the content identifier is determined according to the target resource under the resource path.

[0024] In this embodiment, for each resource path, a content identifier that can uniquely represent the content of the resource under the resource path is generated, and the generation of the content identifier depends on the actual storage of the target resource under the corresponding resource path, for example, by calculating the hash value of the target resource under the resource path, which makes the content identifier corresponding to the resource path remain unchanged as long as the content of the target resource under the resource path does not change; once the content of the target resource is modified, the content identifier of the resource path will also change, thereby providing accurate judgment basis for subsequent monitoring of text file changes.

[0025] In step S130, a dependency graph of the target repository is constructed according to each resource path, each content identifier, and each dependency relationship.

[0026] In the embodiment, the resource path is used as the resource node, the text file is used as the text node, and the dependency relationship between the text file and the resource path is used to connect the resource node corresponding to the text file and the resource node corresponding to the resource path in the form of a directed edge, so as to establish the reference association between each text file and each resource path in the target repository, and provide data basis for subsequent monitoring of text file changes.

[0027] It should be noted that the content identifier corresponding to the resource path is used as the attribute information of the resource node corresponding to the resource path, and by monitoring the change of the attribute information corresponding to the resource node, it can be determined whether the target resource under the resource node corresponding to the resource path is changed.

[0028] In an embodiment, please refer to Figure 2 , step S130 includes steps S131-S134.

[0029] In step S131, each resource path is determined as a resource node, and each content identifier is determined as attribute information of each resource node, and the content identifier corresponds to the same resource path as the resource node.

[0030] In constructing the dependency graph of the target repository, each resource path, such as path / to / image.png, is abstracted as an independent resource node in the dependency graph, serving as the unique identifier of the resource path in the dependency graph; meanwhile, the content identifier corresponding to each resource path is set as the attribute information of the corresponding resource node.

[0031] In step S132, each of the text files is determined as a text node.

[0032] In constructing the dependency graph, each text file in the target repository is abstracted as an independent text node in the dependency graph, and each text node represents an actual text file.

[0033] In step S133, each of the subordinating relationships is determined as a directed edge.

[0034] The subordinating relationship between the text file and the resource path, i.e., which text file references which resource path, is converted into a directed connection line, i.e., a directed edge. The starting point of the directed edge is the text node corresponding to the text file referencing the resource path, and the ending point is the resource node corresponding to the referenced resource path. The direction clearly embodies the logical relationship that the text file points to the referenced resource path, so that the dependency graph can intuitively reflect the subordinating relationship between the text node corresponding to the text file and the resource node corresponding to the resource path.

[0035] In step S134, the dependency graph of the target repository is determined according to each resource node, the attribute information corresponding to each resource node, and each directed edge.

[0036] In constructing the dependency graph of the target repository, the resource node corresponding to each resource path is taken as the basic element, the attribute information associated with the resource node, such as the content identifier, is taken as the basis for describing the characteristics of the node, and the directed edge obtained from the subordinating relationship between the text file and the resource path is taken to represent the dependency direction. By organically integrating these resource nodes, node attribute information, and directed edges, a structured graph model is formed, which completely and intuitively presents the dependency relationship between the text files and external resources in the target repository, providing data support for subsequent monitoring of resource changes and analysis of the impact scope.

[0037] In step S140, the library identifier (Git Commit-Id) of the target repository is obtained, and it is determined whether the library identifier satisfies the preset identifier condition. If yes, the target resource path is determined according to the dependency graph and the historical dependency graph of the target repository in the last monitoring period.

[0038] In the embodiment, the library identifier of the target repository is a 40-bit hexadecimal string generated by a secure hash algorithm (SHA-1, Secure Hash Algorithm 1) and used to uniquely identify the target repository.

[0039] It should be noted that any commit operation in the target repository triggers the library identifier update, and even if the commit content is the same, the generated library identifier is different, so when the target resource under the resource path is modified, even if the content of the text file is not changed, the commit operation after modifying the target resource will trigger the library identifier update of the target repository.

[0040] In an embodiment, the determining whether the library identifier meets the preset identifier condition comprises: comparing the library identifier with a historical library identifier, the historical library identifier being a library identifier of the target repository obtained in a previous monitoring period; and if the library identifier is different from the historical library identifier, it is determined that the library identifier meets the preset identifier condition.

[0041] In the embodiment, the current obtained library identifier is compared with a historical library identifier saved in a previous monitoring period. The historical library identifier is also generated by the SHA-1 algorithm and represents the state of the target repository in the previous period. If there is a difference between the string content of the current library identifier and the historical library identifier, it means that the content in the target repository has changed (such as the addition or deletion of a text file, or the content modification of the target resource under the resource path referenced by the text file), and at this time, it can be determined that the current library identifier meets the preset identifier condition, and then the subsequent change analysis process based on the dependency graph is triggered to locate the target resource path.

[0042] In an embodiment, the determining the target resource path according to the dependency graph and the historical dependency graph comprises: comparing the dependency graph and the historical dependency graph to obtain a structural difference between the dependency graph and the historical dependency graph, the structural difference including a difference between attribute information of each resource node in the dependency graph and attribute information of a corresponding resource node in the historical dependency graph, or a difference between a directed edge in the dependency graph and a directed edge in the historical dependency graph; and determining the target resource path according to the structural difference. In the present embodiment, when determining the target resource path, a comprehensive comparative analysis needs to be performed on the current dependency graph and the historical dependency graph of the last monitoring period. Specifically, structural differences between them are found, which mainly manifest in two aspects: one is the attribute information difference of resource nodes, i.e., whether the attribute information of each resource node in the current dependency graph is consistent with the attribute information of the corresponding resource node in the historical dependency graph; the other is the difference of directed edges, i.e., whether the directed edges representing the resource path and the text file reference relationship in the current dependency graph and the directed edges in the historical graph change in quantity and direction. Finally, based on these identified structural differences, the resource paths that have changed, added or deleted can be accurately found, which are the target resource paths that need to be focused on.

[0043] Step S150, at least one associated text file having the dependency relationship with the target resource path is obtained from the dependency graph or the historical dependency graph.

[0044] After determining the target resource path, in order to clarify the influence range of the change of the target resource path on the text file, the resource node corresponding to the target resource path is taken as the retrieval core, and the directed edges recorded in the dependency graph are used for reverse traversal, i.e., starting from the resource node, all directed edges with the resource node as the terminal point are found, and the text nodes corresponding to the starting points of these directed edges are the associated text files that reference the target resource path. For example, if the target resource path is assets / chart.png, the corresponding resource node is located in the dependency graph, and all directed edges pointing to the resource node are found through reverse query, and then the starting points of these edges (such as report.mdanalysis.md, etc.) are determined, which are the associated text files.

[0045] Step S160, according to a preset filtering rule, a target text file is screened out from at least one associated text file, the target text file being the associated text file whose text content has changed.

[0046] In this embodiment, after obtaining all the associated text files referring to the target resource path, the files are automatically screened according to preset filtering rules to accurately locate the files whose text content has actually changed. For example, the preset rules can specify to screen only files in.md format, or to keep only files modified after the resource change time; or the content of a file can be judged to be substantially updated by comparing the hash value of the file and the text paragraph difference algorithm. The finally screened files are the target text files, which will be the key objects for subsequent processing, such as triggering re-rendering, generating change prompts, or being included in the version management process. In this way, invalid processing of unchanged files can be effectively avoided, the efficiency and accuracy of resource change response can be greatly improved, and unnecessary consumption of computing resources can be reduced.

[0047] In an embodiment, the filtering of the target text file from at least one of the associated text files according to the preset filtering rules comprises: determining a text identifier of the associated text file, and if the text identifier of the associated text file is different from a historical text identifier of the associated text file in a previous monitoring period, determining the associated text file as the target text file, wherein the historical text identifier is the text identifier of the associated text file in the previous monitoring period.

[0048] In the screening of the target text file, the text identifier of each associated text file is determined respectively. The text identifier is usually generated based on the hash value of the file content, ensuring that any change in the file content will cause the corresponding text identifier to change. Then, the currently calculated text identifier is compared with the historical text identifier saved in the previous monitoring period. If they are different, it is determined that the file content has been modified between the two monitoring periods, and the file is determined as the target text file. This mechanism realizes accurate identification of file content changes through the uniqueness of the hash algorithm, avoids false positives caused by changes in file metadata (such as modification time and permissions), and ensures that only files with actual content updates are processed subsequently. The core advantage is to efficiently and accurately locate the changed files that need to be focused on, reduce unnecessary system overhead, and improve the efficiency of automated processing.

[0049] In an embodiment, the filtering of the target text file from at least one of the associated text files according to the preset filtering rules comprises: obtaining a content identifier of the target resource path, and if the content identifier of the target resource path is different from a historical content identifier of the target resource path in a previous monitoring period, determining the associated text file associated with the target resource path as the target text file, wherein the historical content identifier is the content identifier of the target resource path in the previous monitoring period.

[0050] In the screening of the target text file, the content identifier of the referenced target resource path of the target text file is obtained, and is compared with the historical content identifier of the target resource path recorded in the last monitoring period. If the two are inconsistent, it means that the content of the target resource has changed. At this time, all the associated text files related to the target resource path can be directly determined as the target text file. The core of this logic is that when the resource content changes, the text file referencing it also needs to be updated synchronously. Therefore, by comparing the resource content identifiers, all text files affected by the resource change can be quickly located, avoiding the omission of text files that need to be adjusted due to the change of the target resource under the referenced resource path, and reducing the invalid processing of text files not associated with the resource, thereby improving the efficiency.

[0051] In an embodiment, the method further comprises: generating update prompt information according to each of the target text files, the update prompt information being used to prompt the update of the text identifier of each of the target text files.

[0052] After determining all target text files (i.e. associated text files affected by the change of the resource), update prompt information is automatically generated according to the target text files to prompt the relevant personnel to update the text identifier of each target text file.

[0053] The text file change monitoring method provided by the embodiments of the present application comprises the following steps: traversing each text file in a target warehouse in a current monitoring period, obtaining a plurality of resource paths included in each text file, and determining the dependency relationship between each resource path and each text file; obtaining the content identifier of each resource path, the content identifier being determined according to the target resource under the resource path; constructing a dependency graph of the target warehouse according to each resource path, each content identifier, and each dependency relationship; obtaining the library identifier of the target warehouse, judging whether the library identifier meets a preset identifier condition, and if so, determining a target resource path according to the dependency graph and a historical dependency graph, the historical dependency graph being the dependency graph of the target warehouse in the last monitoring period; obtaining at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; and screening a target text file from at least one associated text file according to a preset filtering rule, the target text file being the associated text file whose text content has changed, which realizes the automatic identification of the influence of the external resource change on the text file, automatically triggers the update of the affected text file, improves the monitoring efficiency, and reduces the maintenance cost of the target warehouse.

[0054] Embodiment 2 In addition, please refer to Figure 3The embodiment of the present application also provides a text file change monitoring system 300, comprising: A first obtaining module 310 is configured to traverse each text file in a target warehouse in a current monitoring period, obtain a plurality of resource paths included in each text file respectively, and determine a dependency relationship between each resource path and each text file; A second obtaining module 320 is configured to obtain a content identifier of each resource path respectively, wherein the content identifier is determined according to a target resource under the resource path; A constructing module 330 is configured to construct a dependency graph of the target warehouse according to each resource path, each content identifier, and each dependency relationship; A determining module 340 is configured to obtain a library identifier of the target warehouse, judge whether the library identifier satisfies a preset identifier condition, and if yes, determine a target resource path according to the dependency graph and a historical dependency graph, wherein the historical dependency graph is the dependency graph of the target warehouse in a previous monitoring period; A third obtaining module 350 is configured to obtain at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; A text determining module 360 is configured to screen a target text file from the at least one associated text file according to a preset filtering rule, wherein the target text file is the associated text file whose text content is changed.

[0055] The text file change monitoring method provided in this application embodiment involves a first acquisition module 310 traversing each text file in the target repository within the current monitoring period to acquire multiple resource paths included in each text file and determine the dependency relationship between each resource path and each text file; a second acquisition module 320 acquiring the content identifier of each resource path, the content identifier being determined based on the target resource under the resource path; a construction module 330 constructing a dependency graph of the target repository based on each resource path, each content identifier, and each dependency relationship; and a determination module 340 acquiring the library identifier of the target repository, determining whether the library identifier meets a preset identifier condition, and if so, determining the dependency relationship based on the specified condition. The system uses a dependency graph and a historical dependency graph to determine the target resource path. The historical dependency graph is the dependency graph of the target repository within the previous monitoring period. The third acquisition module 350 obtains at least one associated text file that has the subordinate relationship with the target resource path from the dependency graph or the historical dependency graph. The text determination module 360 ​​filters out the target text file from the at least one associated text file according to preset filtering rules. The target text file is the associated text file whose text content has changed. This system can automatically identify the impact of external resource changes on text files and automatically trigger the update of the affected text files, thereby improving monitoring efficiency and reducing the maintenance cost of the target repository.

[0056] The text file change monitoring system 300 provided in this embodiment of the invention can execute the text file change monitoring method provided in the above-described method embodiment 1. To avoid repetition, it will not be described again here.

[0057] Example 3 Furthermore, this embodiment of the invention provides an electronic device 400, including a memory 403 and a processor 402. The memory 403 stores a computer program, and the computer program executes the text file change monitoring method provided in Embodiment 1 when it runs on the processor 402.

[0058] For details, please see Figure 4The electronic device 400 comprises a transceiver 401, a bus interface and a processor 402, the processor 402 is configured to traverse each text file in a target warehouse in a current monitoring period, acquire a plurality of resource paths respectively included in each text file, and determine a dependency relationship between each resource path and each text file; acquire a content identifier of each resource path respectively, the content identifier is determined according to a target resource under the resource path; construct a dependency graph of the target warehouse according to each resource path, each content identifier and each dependency relationship; acquire a library identifier of the target warehouse, judge whether the library identifier satisfies a preset identifier condition, if yes, determine a target resource path according to the dependency graph and a historical dependency graph of the target warehouse, the historical dependency graph is a dependency graph of the target warehouse in a last monitoring period; acquire at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; and screen a target text file from at least one associated text file according to a preset filtering rule, the target text file is the associated text file whose text content is changed. Figure 4 In the embodiment, the bus architecture can comprise any number of interconnected buses and bridges, which link together various circuits represented by the processor 402 and the memory 403. The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and thus, are not further described herein. The bus interface provides an interface. The transceiver 401 can be a plurality of elements, i.e., comprising a transmitter and a receiver, which provide units for communicating with various other devices on a transmission medium. The processor 402 is responsible for managing the bus architecture and general processing, and the memory 403 can store data used by the processor 402 in performing operations.

[0059] The electronic device 400 provided by the embodiment can execute the text file change monitoring method provided by the method embodiment 1, and thus, is not further described herein.

[0060] Embodiment 4 In addition, the embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by the processor 402 to realize the text file change monitoring method provided by the embodiment 1.

[0061] In the embodiment, the computer readable storage medium can be a read-only memory 403 (ROM), a random access memory 403 (RAM), a magnetic disk or an optical disk, etc.

[0062] The computer readable storage medium provided in the embodiment can implement the text file change monitoring method provided in the embodiment 1, and thus, details are not described herein again.

[0063] In all the examples shown and described herein, any specific values should be interpreted as merely exemplary and not limiting, and thus, other examples of the example embodiments can have different values.

[0064] It should be noted that like reference numerals and letters refer to like items throughout the several views, and once an item is defined in one view, it is not necessary to further define and explain it in the subsequent views.

[0065] The above described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the present application. It should be pointed out that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. A method of monitoring changes in a text file, characterized by, The method comprises: traversing each text file in a target warehouse in a current monitoring period, obtaining a plurality of resource paths respectively included in each text file, and determining the dependency relationship between each resource path and each text file; respectively obtaining the content identifier of each resource path, the content identifier being determined according to the target resource under the resource path; constructing a dependency graph of the target warehouse according to each resource path, each content identifier, and each dependency relationship; obtaining a library identifier of the target warehouse, judging whether the library identifier meets a preset identifier condition, and if so, determining a target resource path according to the dependency graph and a historical dependency graph, the historical dependency graph being the dependency graph of the target warehouse in the last monitoring period; obtaining at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; screening a target text file from at least one associated text file according to a preset filtering rule, the target text file being the associated text file whose text content has changed.

2. The text file change monitoring method according to claim 1, characterized by, The method comprises: determining each resource path as a resource node, determining each content identifier as attribute information of each resource node, and the content identifier and the resource node corresponding to the same resource path; determining each text file as a text node; determining each dependency relationship as a directed edge; determining the dependency graph of the target warehouse according to each resource node, the attribute information corresponding to each resource node, and each directed edge.

3. The text file change monitoring method according to claim 2, characterized by, The method comprises: comparing the library identifier with a historical library identifier, the historical library identifier being the library identifier of the target warehouse obtained in the last monitoring period; if the library identifier is different from the historical library identifier, it is determined that the library identifier meets the preset identifier condition.

4. The text file change monitoring method according to claim 3, characterized by, The method comprises: comparing the dependency graph and the historical dependency graph, obtaining the structural difference between the dependency graph and the historical dependency graph, the structural difference including the difference between the attribute information of each resource node in the dependency graph and the attribute information of the corresponding resource node in the historical dependency graph, or the difference between the directed edge in the dependency graph and the directed edge in the historical dependency graph; determining the target resource path according to the structural difference.

5. The method of claim 1, wherein, The method comprises: determining a text identifier of the associated text file, and determining the associated text file as the target text file if the text identifier of the associated text file is different from a historical text identifier of the associated text file, the historical text identifier being a text identifier of the associated text file in a previous monitoring period.

6. The method of claim 1, wherein, The filtering of the target text file from the at least one associated text file according to the preset filtering rule comprises: obtaining a content identifier of the target resource path, and determining the associated text file associated with the target resource path as the target text file if the content identifier of the target resource path is different from a historical content identifier of the target resource path, the historical content identifier being a content identifier of the target resource path in a previous monitoring period.

7. The method of claim 1, wherein, The method further comprises: generating an update prompt information according to each target text file, the update prompt information being used to prompt an update of a text identifier of each target text file.

8. A text file change monitoring system characterized by comprising: The system comprises: a first obtaining module configured to traverse each text file in a target repository in a current monitoring period, obtain a plurality of resource paths included in each text file respectively, and determine a dependency relationship between each resource path and each text file; a second obtaining module configured to obtain a content identifier of each resource path respectively, the content identifier being determined according to a target resource under the resource path; a constructing module configured to construct a dependency graph of the target repository according to each resource path, each content identifier, and each dependency relationship; a determining module configured to obtain a library identifier of the target repository, determine whether the library identifier satisfies a preset identifier condition, and if so, determine a target resource path according to the dependency graph and a historical dependency graph of the target repository, the historical dependency graph being the dependency graph of the target repository in a previous monitoring period; a third obtaining module configured to obtain at least one associated text file having the dependency relationship with the target resource path from the dependency graph or the historical dependency graph; a text determining module configured to filter a target text file from the at least one associated text file according to a preset filtering rule, the target text file being the associated text file in which text content is changed.

9. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the text file change monitoring method in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the text file change monitoring method in any one of claims 1-7.