System
An AI-driven system acquires and analyzes source code to generate real-time architecture diagrams, highlighting important components and answering questions, addressing the challenge of system configuration understanding and change impact prediction.
Patent Information
- Application Number
- JP2024119049
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2026-02-05
AI Technical Summary
In system development, it is difficult for new participants to quickly and accurately grasp the system configuration, understand source code dependencies, and predict the scope of impact from changes, with manual updates being costly and lacking real-time performance.
A system that acquires source code, analyzes dependencies, generates architecture diagrams in real-time, highlights important components, and answers user questions using AI-driven tools to facilitate quick understanding and impact analysis.
Enables new participants to quickly and accurately understand the project architecture and effectively proceed with their work, with real-time updates and impact analysis.
Smart Images

Figure 2026017988000001_ABST
Abstract
Description
[Technical Field]
[0001] The technology of the present disclosure relates to a system. [Background technology]
[0002] Patent document 1 discloses a persona chatbot control method performed by at least one processor, the method including the steps of receiving a user utterance, adding the user utterance to a prompt including an instruction sentence related to a description of the chatbot character, encoding the prompt, and inputting the encoded prompt into a language model to generate a chatbot utterance in response to the user utterance. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-180282 Summary of the Invention [Problem to be solved by the invention]
[0004] In system development, when new participants join an existing project, it is difficult to quickly and accurately grasp the system configuration. In particular, understanding source code dependencies and the importance of each component requires a great deal of time and effort. It is also difficult to accurately predict the scope of impact when a system change occurs. Furthermore, manually updating architecture diagrams is costly and lacks real-time performance. A system that solves these issues and enables new participants and stakeholders to quickly understand the system and proceed with their work effectively is needed. [Means for solving the problem]
[0005] To solve the above problems, the present invention provides the following means. First, a means for acquiring source code is provided to acquire the latest source code for a project. Next, a means for analyzing the acquired source code and extracting dependencies between components is provided. Furthermore, a means for automatically generating an architecture diagram based on the extracted dependencies is provided. Finally, a means for updating the generated architecture diagram in real time is provided to always provide the latest information. A means for responding to questions from users is provided to instantly answer questions about the architecture. Furthermore, a means for highlighting important components on the generated architecture diagram and weighting them based on their frequency of use and the number of connections is provided. Furthermore, a means for analyzing the scope of impact and implementation difficulty when proposing changes is provided, making it possible to understand the impact of changes in advance. This allows new entrants and stakeholders to quickly and accurately grasp the overall picture of the system and effectively proceed with their work.
[0006] "Source code" is textual code that describes the behavior of a program and is written using a programming language.
[0007] "Analysis" is a means of examining data or information in detail to clarify its structure and meaning.
[0008] A "component" is a highly independent module or part that makes up a system or application, each with a specific function.
[0009] The term "dependency" refers to a relationship in which a component depends on another component, and refers to a state in which one component depends on the existence or function of the other.
[0010] An "architecture diagram" is a diagram that visually shows the structure of a system and the relationships between its components.
[0011] "Real-time" refers to a system that operates or processes information instantly with little or no delay.
[0012] "Users" refers to people who use the system or end users.
[0013] "Responding to a question" refers to the act of providing an appropriate answer to a question received from a user.
[0014] "Highlighting" is a method of distinguishing a particular element from other elements and making it stand out by using color, size, etc.
[0015] "Frequency of use" is an indicator of how frequently a particular component is used.
[0016] The "number of connections" is an index showing how many relationships a component has with other components.
[0017] "Change proposal" refers to the act of proposing new changes or improvements to an existing system.
[0018] The "scope of impact" indicates the scope of the impact of a change, and refers to which components are affected by the change.
[0019] "Implementation difficulty" is an indicator of the effort and technical difficulty required to implement a particular change in a system. [Brief explanation of the drawings]
[0020] [Figure 1] 1 is a conceptual diagram showing an example of the configuration of a data processing system according to a first embodiment. [Figure 2] 1 is a conceptual diagram showing an example of main functions of a data processing device and a smart device according to a first embodiment. [Figure 3] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a second embodiment. [Figure 4] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and smart glasses according to a second embodiment. [Figure 5] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a third embodiment. [Figure 6] FIG. 11 is a conceptual diagram showing an example of main functions of a data processing device and a headset-type terminal according to a third embodiment. [Figure 7] FIG. 10 is a conceptual diagram showing an example of the configuration of a data processing system according to a fourth embodiment. [Figure 8] FIG. 10 is a conceptual diagram showing an example of main functions of a data processing device and a robot according to a fourth embodiment. [Figure 9] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 10] 1 shows an emotion map onto which multiple emotions are mapped. [Figure 11] FIG. 3 is a sequence diagram showing a processing flow of the data processing system according to the first embodiment. [Figure 12] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 1. [Figure 13] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system according to the second embodiment when an emotion engine is combined. [Figure 14] FIG. 10 is a sequence diagram showing the flow of processing in the data processing system in Application Example 2 when an emotion engine is combined. DETAILED DESCRIPTION OF THE INVENTION
[0021] An example of an embodiment of a system according to the technology of the present disclosure will be described below with reference to the accompanying drawings.
[0022] First, the terms used in the following description will be explained.
[0023] In the following embodiments, a coded processor (hereinafter simply referred to as a "processor") may be a single arithmetic device or a combination of multiple arithmetic devices. Furthermore, a processor may be a single type of arithmetic device or a combination of multiple types of arithmetic devices. Examples of arithmetic devices include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), a GPGPU (General-Purpose computing on Graphics Processing Units), and an APU (Accelerated Processing Unit).
[0024] In the following embodiments, a coded RAM (Random Access Memory) is a memory in which information is temporarily stored and is used as a working memory by a processor.
[0025] In the following embodiments, the coded storage is one or more non-volatile storage devices that store various programs, various parameters, etc. Examples of non-volatile storage devices include flash memory (SSD (Solid State Drive)), magnetic disks (e.g., hard disks), and magnetic tapes.
[0026] In the following embodiments, a communication I / F (Interface) with a symbol is an interface including a communication processor, an antenna, etc. The communication I / F controls communication between multiple computers. Examples of communication standards applied to the communication I / F include wireless communication standards including 5G (5th Generation Mobile Communication System), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc.
[0027] In the following embodiments, "A and / or B" is synonymous with "at least one of A and B." In other words, "A and / or B" means that it may be only A, only B, or a combination of A and B. Furthermore, in this specification, the same concept as "A and / or B" is also applied when three or more things are expressed connected by "and / or."
[0028] [First embodiment]
[0029] FIG. 1 shows an example of the configuration of a data processing system 10 according to the first embodiment.
[0030] 1, a data processing system 10 includes a data processing device 12 and a smart device 14. An example of the data processing device 12 is a server.
[0031] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0032] The smart device 14 includes a computer 36, a reception device 38, an output device 40, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The reception device 38, the output device 40, and the camera 42 are also connected to the bus 52.
[0033] The reception device 38 includes a touch panel 38A, a microphone 38B, and the like, and receives user input. The touch panel 38A detects contact with an indicator (for example, a pen or a finger) to receive user input by the touch of the indicator. The microphone 38B detects the user's voice to receive user input by voice. The control unit 46A transmits data indicating the user input received by the touch panel 38A and the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the data indicating the user input.
[0034] The output device 40 includes a display 40A and a speaker 40B, and presents data to the user 20 by outputting the data in a form of expression that the user 20 can perceive (for example, audio and / or text). The display 40A displays visible information such as text and images in accordance with instructions from the processor 46. The speaker 40B outputs audio in accordance with instructions from the processor 46. The camera 42 is a compact digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor.
[0035] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 control the exchange of various information between the processor 46 and the processor 28 via the network 54.
[0036] FIG. 2 shows an example of the main functions of the data processing device 12 and the smart device 14.
[0037] 2, in the data processing device 12, a specific process is performed by the processor 28. A specific processing program 56 is stored in the storage 32. The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific process is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0038] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0039] In the smart device 14, the processor 46 performs the reception output process. The storage 50 stores a reception output program 60. The reception output program 60 is used in conjunction with the specific processing program 56 by the data processing system 10. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0040] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0041] This invention is an AI-driven tool that enables newcomers to quickly understand the architecture of a project and proceed with their work effectively. A specific embodiment of this system will be described below.
[0042] System Configuration
[0043] The system consists of three components: a server, a terminal (client), and a user. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface to the user, allowing the user to operate the system and view information.
[0044] Program processing
[0045] Source code acquisition and analysis
[0046] To obtain the source code of a project, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine to extract information such as classes, methods, and dependencies. This information is stored in an internal database.
[0047] Generate architecture diagrams
[0048] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js or Graphviz. This diagram is displayed in the user's browser via the terminal.
[0049] Dependency Analysis
[0050] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[0051] Importance rating and highlighting
[0052] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0053] Real-time updates
[0054] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[0055] prompt question answer
[0056] Users can input questions about architecture via their devices. The server analyzes the questions using natural language processing (NLP) and generates appropriate answers from the analysis results. The generated answers are displayed on the user's device.
[0057] Component description generation
[0058] The server automatically generates a description for each component. It uses natural language processing technology to create the description based on the component's metadata (role, dependencies, use cases, etc.). The created description is then displayed on the device for the user to view.
[0059] Impact analysis of proposed changes
[0060] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's device.
[0061] Specific examples
[0062] For example, consider a user starting a new project and trying to understand the architecture of an existing system. The user accesses the tool via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram, highlighting important components. When the user asks a question about a specific component, the server instantly generates an answer and displays it on the terminal.
[0063] Furthermore, when a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, allowing the user to understand the impact of the proposal in advance and make more careful and efficient changes.
[0064] The above is an embodiment of the present invention. This system is a powerful tool that enables new participants and stakeholders to quickly and accurately understand a project and to carry out their work effectively.
[0065] The processing flow will be explained below.
[0066] Step 1:
[0067] Get the source code
[0068] Server: Obtains the latest source code from the project repository. Specifically, it uses the Git repository URL and clones the repository to a local environment using the git clone command or API. This retrieval process is performed periodically or triggered by a user request.
[0069] Step 2:
[0070] Source code analysis
[0071] Server: The cloned source code is passed to the analysis engine. Specifically, static analysis tools are used to analyze classes, methods, and dependencies. The analysis results are extracted as relationships and metadata for each component.
[0072] Step 3:
[0073] Saving to a database
[0074] Server: Stores the analysis results in an internal database, specifically a NoSQL database that stores component information and dependency data for future reference and analysis.
[0075] Step 4:
[0076] Generate architecture diagrams
[0077] Server: Generates an architecture diagram based on the saved analysis results. Specifically, it uses libraries such as D3.js and Graphviz to visually represent the analysis data. The generated diagram can be manipulated interactively by the user.
[0078] Step 5:
[0079] Dependency Analysis
[0080] Server: Further analyzes the dependencies between each component. Specifically, based on the analyzed dependency data, a dependency graph is created and the parent-child relationships between each node (component) are clarified.
[0081] Step 6:
[0082] Importance rating and highlighting
[0083] Server: Evaluates the importance of each component based on frequency of use and number of connections. Specifically, it analyzes log files and counts the frequency of calls to each component. Based on the results, it calculates an importance score and highlights important components on the architecture diagram by changing color and size.
[0084] Step 7:
[0085] Real-time update settings
[0086] Server: Set up a mechanism to detect source code changes in real time. Specifically, it uses Git webhooks to trigger analysis and diagram updates when changes are pushed to the repository.
[0087] Step 8:
[0088] Real-time updates
[0089] Server: When a change is detected, the source code is analyzed again, the architecture diagram is updated, and the results are sent to the client in real time.
[0090] Terminal: Receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[0091] Step 9:
[0092] prompt question answer
[0093] User: Enter architecture questions in a prompt format.
[0094] Server: Uses AI models to analyze the intent of the question and generate appropriate answers. Searches for relevant component information and dependencies to automatically generate answers.
[0095] Terminal: Displays the answer received from the server to the user.
[0096] Step 10:
[0097] Component description generation
[0098] Server: Based on the metadata of each component, it generates a description that is easy to understand even for beginners. Specifically, it uses NLP technology to automatically create the description.
[0099] Terminal: Display the generated description to the user.
[0100] Step 11:
[0101] Impact analysis of proposed changes
[0102] User: Submits system change proposals to the server.
[0103] Server: Analyzes the impact of the proposed change on other components. Specifically, it calculates the scope of impact based on the dependency graph and evaluates the components affected by the change and the difficulty of implementing it.
[0104] Terminal: Presents the calculated impact range and implementation difficulty to the user.
[0105] These are the specific processing steps in the program of this system. This system enables new participants and stakeholders to quickly and accurately understand the project and carry out their work efficiently.
[0106] Example 1
[0107] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0108] With conventional technology, it was difficult for newcomers to quickly understand the overall architecture of a project and proceed with their work effectively. In addition, there was an insufficient means to grasp in real time the impact that source code changes would have on the entire project, making it difficult to manage the risks associated with changes.
[0109] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0110] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between program elements, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user using natural language processing, means for highlighting important program elements on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes when a change is made, and means for calculating the frequency of use of each program element using log analysis. This enables newcomers to quickly grasp the overall picture of the project and to understand in real time the impact that changes to the source code will have on the entire project.
[0111] "Source code" is the text that describes a program and is converted into binary code that can be executed by a computer.
[0112] A "server" is a computer system that provides services over a network. In this case, it analyzes source code and generates architecture diagrams.
[0113] The "means of retrieval" refers to the mechanism for retrieving source code from a specified repository. This mainly includes the Git client.
[0114] "Means of analysis" refers to technologies for analyzing the contents of source code and extracting program elements and their dependencies. This includes static analysis engines.
[0115] A "program element" refers to an individual component in source code, and specifically includes classes, methods, variables, etc.
[0116] A "dependency" refers to a relationship of mutual dependence between program elements. For example, when one class calls another class, a dependency exists between them.
[0117] An "architecture diagram" is a visual representation of the structure of a software system and the relationships between its components.
[0118] "Means for real-time updates" refers to a mechanism for instantly detecting changes in source code and simultaneously updating the corresponding architecture diagrams. This mainly includes web hooks and WebSockets.
[0119] "Natural language processing" is a technique that allows computers to understand human language. Here, it is used to generate appropriate responses to user questions.
[0120] "Important program elements" refer to elements that have a particularly high impact or frequency of use within the entire system.
[0121] "Highlighting methods" are mechanisms used to visually highlight important program elements, including changes in color and size.
[0122] "Change Proposal" means a proposal to make new modifications or additions to an existing program.
[0123] "Scope of impact" refers to the extent to which a proposed change will affect the entire system.
[0124] "Implementation difficulty" indicates the technical difficulty and effort required to implement the proposed change.
[0125] "Log analysis" is a technique for analyzing a system's operation history and identifying specific patterns and frequency of use.
[0126] This invention is an AI-driven tool that helps newcomers quickly understand the project architecture and work effectively. The system consists of three entities: a server, a terminal, and a user.
[0127] System configuration
[0128] The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface for users, allowing them to operate the system and view information.
[0129] Hardware and software used
[0130] Server: A high-performance computer system (e.g., a cloud server)
[0131] Hardware: The server has a CPU, RAM, and SSD.
[0132] software:
[0133] Git client: Used to get the source code
[0134] Static analysis engines: SonarQube, ESLint, etc.
[0135] Graph generation: D3.js, Graphviz
[0136] Log analysis: Logstash, Kibana
[0137] Natural Language Processing Engines: GPT-3, BERT
[0138] WebSocket: Real-time update notifications
[0139] Webhooks: Git change monitoring
[0140] Program processing
[0141] Get the source code
[0142] The server clones the source code from the Git repository specified by the user, and the latest source code for the project is stored on the server.
[0143] Source Code Analysis
[0144] The source code is analyzed using a static analysis engine (e.g. SonarQube or ESLint) to extract dependencies between program elements, and this information is stored in an internal database.
[0145] Generate architecture diagrams
[0146] The server generates an architecture diagram based on the analysis results, for example, using D3.js or Graphviz to create a visual diagram, which is then displayed in the user's browser via the terminal.
[0147] Dependency Analysis
[0148] The server analyzes the dependencies between each program element and stores the results as a dependency graph, which can be visualized on the terminal and manipulated interactively by the user.
[0149] Importance rating and highlighting
[0150] The server uses log analysis tools (e.g., Logstash and Kibana) to calculate the frequency of use and number of connections for each program element and evaluate its importance. The evaluation results are highlighted by color and size and reflected in the architecture diagram.
[0151] Real-time updates
[0152] The server uses Git web hooks to detect changes in the source code in real time and immediately update the architecture diagram, while the terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[0153] Question and Answer Function
[0154] A user can enter a question about the architecture via the terminal, for example, "Can you tell me more about a specific class A?" The server uses a natural language processing engine (e.g., GPT-3 or BERT) to analyze the question and generate an appropriate answer, which is then displayed on the terminal.
[0155] Automatic generation of component descriptions
[0156] The server automatically generates descriptions for each program element based on the component's metadata (roles, dependencies, use cases, etc.) using natural language processing technology, and displays the descriptions on the terminal.
[0157] Impact analysis of proposed changes
[0158] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, if a user inputs "Please analyze the scope of impact if a new method C is added to class B," the server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal.
[0159] Specific examples
[0160] For example, if a user is starting a new project and wants to understand the architecture of an existing system, they access the tool via their terminal and begin the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important program elements. When the user asks a question about a specific program element, the server instantly generates an answer and displays it on the terminal. Furthermore, when the user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, and provides information based on that analysis to the terminal.
[0161] Prompt Sentence Examples
[0162] "Please describe the project architecture, highlighting the most important program elements."
[0163] "Give me more details about a specific class A, including any dependencies or use cases."
[0164] "Analyze the impact of specific proposed changes on other program elements."
[0165] In this way, the system provides a powerful tool for newcomers and current project members to quickly understand the overall system picture and make changes effectively.
[0166] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0167] Step 1:
[0168] The server retrieves the latest source code from the Git repository specified by the user. Specifically, the user enters the repository URL via the terminal, and based on the input information, the server clones the repository using a Git client and retrieves the source code. This retrieved source code is stored in the server's storage.
[0169] Step 2:
[0170] The server sends the acquired source code to a static analysis engine (e.g., SonarQube, ESLint) to perform the analysis. The analysis engine analyzes the source code and extracts program elements such as classes, methods, and variables, as well as their dependencies. The analysis results are stored in the server's internal database. The input is the source code, and the output is the analysis results (program elements and dependencies).
[0171] Step 3:
[0172] The server automatically generates an architecture diagram based on the analysis results. To do this, the server converts the dependency information into a graph structure and creates a visual architecture diagram using tools such as D3.js or Graphviz. This generated architecture diagram is displayed in the user's browser via the terminal. The input is the analysis results, and the output is the architecture diagram.
[0173] Step 4:
[0174] The server generates a dependency graph based on the dependency information and stores it in an internal database. This dependency graph consists of nodes and edges, and represents each program element and its dependencies. The terminal visualizes this dependency graph and allows the user to manipulate it interactively. The input is the analysis results, and the output is the dependency graph.
[0175] Step 5:
[0176] The server uses a log analysis tool (e.g., Logstash, Kibana) to calculate the frequency of use and number of interactions for each program element. To do this, the server analyzes the data in the log files and counts the number of times each program element is called. Based on this data, the server evaluates the importance and assigns it a score. The input is the log data, and the output is the importance score.
[0177] Step 6:
[0178] The server highlights important program elements on the architecture diagram based on their importance score. For example, it changes the color or size to visually indicate important parts to the user. This allows the user to grasp important program elements at a glance. The input is the importance score, and the output is the highlighted architecture diagram.
[0179] Step 7:
[0180] The server uses Git web hooks to detect changes to the source code in real time. When changes are pushed, the server re-analyzes and immediately updates the architecture diagram. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser. The input is the Git change notification, and the output is the updated architecture diagram.
[0181] Step 8:
[0182] A user inputs a question about the architecture via a terminal, for example, a prompt like "Tell me more about a specific class A." The server analyzes the question using a natural language processing engine (e.g., GPT-3, BERT) and generates an appropriate answer. This answer is displayed on the terminal. The input is the user's question, and the output is the answer.
[0183] Step 9:
[0184] The server automatically generates a description for each program element. Based on the component's metadata (roles, dependencies, use cases, etc.), the description is created using natural language processing technology and displayed on the terminal. For example, a description such as "Class A is a class that provides user authentication functionality and has the following methods" is generated. The input is metadata, and the output is the description.
[0185] Step 10:
[0186] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, the user might input, "Please analyze the scope of impact if a new method C is added to class B." The server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal. The input is the change proposal, and the output is the evaluation results of the scope of impact and the difficulty of implementation.
[0187] (Application example 1)
[0188] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0189] Rapidly introducing new machinery and equipment within factories and effectively performing maintenance and troubleshooting are important for improving work efficiency and ensuring safety. However, with traditional methods, it takes time for workers to understand the architecture and dependencies of new machinery, making it difficult to obtain the necessary information in real time. Furthermore, it is difficult to quickly identify critical components and grasp the impact of proposed changes, reducing work efficiency.
[0190] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0191] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user, means for highlighting important components on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes, and means for displaying visualized information on a smart device to support maintenance work of industrial equipment. This enables workers to quickly understand the architecture of new machines and facilities, obtain necessary information in real time, and significantly improve the efficiency of maintenance and troubleshooting.
[0192] "Source code" refers to program code written to implement the functionality of a computer program or system.
[0193] "Analysis" is the process of examining acquired source code and data in detail to clarify their structure, dependencies, etc.
[0194] "Component dependencies" are relationships that show how each part (component) of a software or system depends on other parts.
[0195] An "architecture diagram" is a visual representation of the overall structure of a system or program, showing the relationships and arrangement of components.
[0196] "Real-time updates" means that when a system or data is changed, the changes are reflected immediately and the latest information is provided.
[0197] "Responding to a question" refers to the process of providing an appropriate answer to a user's inquiry.
[0198] "Highlighting" refers to a display method that uses color, size, etc. to make specific information or components stand out.
[0199] The "scope of impact of proposed changes" refers to the scope that indicates how the changes proposed by the user will affect the entire system or program.
[0200] "Implementation difficulty" refers to the difficulty or complexity of actually incorporating the changes proposed by the user into a system or program.
[0201] "Visualized information" refers to data or analytical results presented in a visual format such as a chart or graph.
[0202] A "smart device" is an electronic device with advanced functionality that can connect to the Internet and run a variety of applications.
[0203] "Industrial equipment maintenance work" refers to the work of inspecting, repairing, and maintaining machinery and equipment used in fields such as manufacturing and heavy industry.
[0204] This invention is an AI-driven tool that enables newcomers to quickly understand project architecture and proceed with their work effectively. This invention will be described as being applied as an application for smart devices to support maintenance work on industrial equipment in factories.
[0205] System Configuration
[0206] The system consists of three components: a server, a terminal (smart device), and a user. The server retrieves and analyzes source code, generates architecture diagrams, analyzes dependencies, assesses importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and generates visualized information. The terminal includes a smart device (e.g., smart glasses) and provides an interface to the user, allowing the user to operate the system and view information.
[0207] Program processing
[0208] 1. Obtaining and analyzing the source code
[0209] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine (e.g., SonarQube) to extract information such as classes, methods, and dependencies. This information is then stored in an internal database (e.g., MySQL).
[0210] 2. Generating an architecture diagram
[0211] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js and Graphviz. This diagram is displayed on the user's smart glasses via the device.
[0212] 3. Dependency Analysis
[0213] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the smart glasses and manipulated interactively by the user.
[0214] 4. Importance rating and highlighting
[0215] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0216] 5. Real-time updates
[0217] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The device receives update notifications via WebSocket and automatically updates the diagram on the smart glasses.
[0218] 6. Question-Answering System
[0219] Users can input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers from the analysis results. This process uses the Google Cloud Natural Language API and other tools. The generated answers are displayed on the user's smart glasses.
[0220] 7. Generating Visualized Information
[0221] Based on the metadata of the components (roles, dependencies, use cases, etc.), the server automatically generates a description using natural language processing technology, which is then displayed for the user to view through the smart glasses.
[0222] 8. Impact Analysis of Proposed Changes
[0223] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's smart glasses.
[0224] Specific examples
[0225] For example, consider a newly installed automated welding robot in a factory. When a worker puts on smart glasses and starts maintenance on the robot, the smart glasses display shows the following information:
[0226] 1. Machine architecture diagram: Visually confirm the internal structure of the automatic welding robot and the layout of its main components.
[0227] 2. Importance highlighting: Important parts are highlighted by color and size based on frequency of use and number of connections.
[0228] 3. Dependency analysis results: The dependencies between components are displayed as a graph, making it easier to identify faults and prioritize repairs.
[0229] 4. Real-time updates: Any changes or anomalies made during work are reflected immediately, and new information is updated in real time.
[0230] 5. Question-answering system: In response to a voice question such as "What role does this sensor play?", an answer such as "This is a sensor that monitors the welding temperature" is instantly displayed.
[0231] Example prompts to input to a generative AI model:
[0232] "Please tell me the role of the welding head sensor on the newly installed automatic welding robot."
[0233] The above is an embodiment of the present invention. This system is a powerful tool that allows newcomers and stakeholders to quickly and accurately understand projects and machines and carry out their work effectively.
[0234] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0235] Step 1: Get the source code
[0236] The server will clone the latest source code from the Git repository to get the source code of the project. This step takes the Git repository URL as input and gets the cloned source code as output. The cloned source code will be saved in a local directory on the server.
[0237] Step 2: Analyzing the source code
[0238] The server performs static analysis of the cloned source code using an analysis engine (e.g., SonarQube). This static analysis extracts information such as classes, methods, and dependencies. The input data is the source code obtained in step 1, and the output is metadata of the analysis results. This metadata is stored in an internal database (e.g., MySQL).
[0239] Step 3: Generate an architecture diagram
[0240] The server automatically generates an architecture diagram based on the analysis results. Here, D3.js and Graphviz are used to visually represent the graph structure. The input data is the dependency information extracted in step 2, and the generated architecture diagram is obtained as the output. This architecture diagram is sent to the smart glasses terminal.
[0241] Step 4: Save the dependency analysis results
[0242] The server analyzes the dependencies between components as a dependency graph and stores the results in a database. The input data is the analysis metadata, and the output is a dependency graph, which can be visualized on the device.
[0243] Step 5: Assess and highlight importance
[0244] The server analyzes logs and calculates the importance of each component based on its frequency of use and the number of connections. The input data is the log file and analysis metadata, and the output is an importance score. Important components are highlighted by color and size and reflected in the architecture diagram.
[0245] Step 6: Real-time updates
[0246] The server uses Git web hooks to detect changes in the source code in real time. The input data is notification of the changes, and the output is updated information on the architecture diagram. This updated information is sent via WebSocket to the smart glasses and is reflected visually.
[0247] Step 7: Operate the Q&A system
[0248] Users input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers. The input data is the voice question, and the output is an answer based on the analysis results. The answer is displayed on the smart glasses.
[0249] Step 8: Generate visualizations
[0250] The server automatically generates a description based on the metadata of the component using natural language processing technology. The input data is the metadata, and the generated description is obtained as output. This description can be viewed using smart glasses.
[0251] Step 9: Impact analysis of proposed changes
[0252] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the impact of the proposal on other components and calculates the difficulty of implementation. The input data is the proposed change, and the output is the scope of impact and the difficulty of implementation. This information is displayed on the smart glasses.
[0253] Furthermore, an emotion engine that estimates the user's emotion may be combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59 and perform identification processing using the user's emotion.
[0254] This invention is a system that combines an AI-driven tool that enables newcomers to quickly understand the project architecture and effectively proceed with their work with an emotion engine that recognizes the user's emotions. A specific embodiment of this system will be described below.
[0255] System Configuration
[0256] The system consists of four components: a server, a terminal (client), a user, and an emotion engine. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and recognizes user emotions. The terminal provides an interface with the user, allowing the user to operate the system and view information. The emotion engine analyzes the user's emotions and provides that information to the server.
[0257] Program processing
[0258] Source code acquisition and analysis
[0259] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is passed to the analysis engine, which performs static analysis and extracts information such as classes, methods, and dependencies. This information is stored in an internal database.
[0260] Generate architecture diagrams
[0261] Based on the analysis results, the server automatically generates an architecture diagram. A graph structure is created based on the extracted dependencies. A visual architecture diagram is generated using libraries such as D3.js and Graphviz, and this diagram is displayed in the user's browser via the terminal.
[0262] Dependency Analysis
[0263] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[0264] Importance rating and highlighting
[0265] The server evaluates the importance of each component based on frequency of use and number of connections. Log analysis is used to calculate the frequency of calls to each component, and an importance score is calculated based on the results. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0266] Real-time updates
[0267] To detect changes in the source code in real time, the server uses Git webhooks. Every time a change is pushed to the repository, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[0268] prompt question answer
[0269] Users input architectural questions in a prompt format via their terminal, and the server uses an AI model to analyze the intent of the question and generate an appropriate answer, searching for relevant component information and dependencies, and providing the answer to the user.
[0270] Component description generation
[0271] The server generates a description based on the metadata of each component, making it easy for even beginners to understand. The description is automatically created using natural language processing (NLP) technology, and the created description is displayed on the user's device.
[0272] Impact analysis of proposed changes
[0273] When a user proposes a change, the server analyzes the scope of the change. It calculates the scope of the impact based on the dependency graph and evaluates the impact of the proposal on other components and the difficulty of implementation. The results are displayed on the user's device.
[0274] Combining Emotion Engines
[0275] emotion recognition
[0276] The emotion engine analyzes emotions from the user's facial expressions, tone of voice, input content, etc. The analyzed emotion information is sent to the server and used for various processes.
[0277] Changing visual emphasis
[0278] The server uses information from the emotion engine to change the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it can further highlight important components or add guide messages to help the user understand.
[0279] Question and answer adjustment
[0280] The server uses information from the emotion engine to adjust the content and method of question and answering. For example, if the user is frustrated, it can provide more polite and detailed explanations to reduce the user's stress. Also, if the emotion engine detects that the user is excited, it can present more proactive suggestions and next learning steps.
[0281] Specific examples
[0282] For example, consider a situation where a user is newly entering a system and trying to understand its existing architecture. The user accesses the system via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important components. In addition, if the emotion engine detects the user's confusion, the server further highlights important components and adds guide messages. When the user asks a question about a specific component, the server uses the information from the emotion engine to provide an appropriate and easy-to-understand answer.
[0283] When a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of its implementation. If the emotion engine detects a lack of confidence in the user, the server provides more detailed and supportive feedback, helping the user to proceed with the proposal with confidence.
[0284] The above is an embodiment of the present invention. This system not only helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, but also provides an advanced interface that takes the user's emotions into consideration.
[0285] The processing flow will be explained below.
[0286] Step 1:
[0287] Get the source code
[0288] Server: Use the git clone command to get the latest source code from the Git repository. Specify the repository URL and download the project source code to a local directory.
[0289] Step 2:
[0290] Source code analysis
[0291] Server: The cloned source code is passed to a static analysis engine, which analyzes the code structure and extracts classes, methods, variables, and dependencies using AST (Abstract Syntax Tree) analysis.
[0292] Step 3:
[0293] Saving to a database
[0294] Server: The analysis results are stored in an internal database. The database is in NoSQL format and stores metadata for each component (such as name, type, and dependencies) as a document.
[0295] Step 4:
[0296] Generate architecture diagrams
[0297] Server: Creates a graph structure based on the stored analysis data and generates an architecture diagram using D3.js or Graphviz. The diagram is sent to the client as JSON.
[0298] Step 5:
[0299] View the architecture diagram
[0300] Terminal: When a user accesses the system using a browser, the generated architecture diagram is displayed, allowing the user to interact with the diagram and view detailed information.
[0301] Step 6:
[0302] Dependency Analysis
[0303] Server: Analyze dependencies between components in detail. Create a dependency graph and explicitly define the relationships between each node and edge. This graph helps visualize the system and understand the dependencies.
[0304] Step 7:
[0305] Importance rating and highlighting
[0306] Server: Evaluate the importance of components based on frequency of use and number of interactions. Perform log analysis to tally the number of calls and interactions for each component. Highlight components on the architecture diagram using color and size according to their importance.
[0307] Step 8:
[0308] Real-time update settings
[0309] Server: Set up Git webhooks to automatically trigger analysis and diagram updates when changes are pushed to the repository, ensuring you always have the latest information.
[0310] Step 9:
[0311] Real-time updates
[0312] Terminal: Receives update notifications via WebSocket and updates the architecture diagram in real time, allowing users to always view the latest system information.
[0313] Step 10:
[0314] prompt question answer
[0315] User: Enters architecture questions into a form in a browser.
[0316] Server: Analyzes the question using a natural language processing engine and generates an appropriate answer. Searches for relevant analytical data and documents to generate the answer.
[0317] Step 11:
[0318] Show Answers
[0319] Terminal: Displays the generated answer to the user. The answer is displayed in the appropriate section of the interface to aid the user in understanding.
[0320] Step 12:
[0321] Emotion recognition
[0322] Terminal: Sends the user's facial expressions, tone of voice, input content, etc. to the emotion engine.
[0323] Emotion engine: Analyzes this data and determines the user's emotional state (e.g., confusion, irritation, confidence, etc.).
[0324] Step 13:
[0325] Sending emotional data
[0326] Emotion Engine: Sends the analyzed emotion data to the server, which combines this information with other processing to improve the user experience.
[0327] Step 14:
[0328] Changing visual emphasis
[0329] Server: Based on information from the emotion engine, it changes the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it further highlights important components and adds auxiliary guide messages.
[0330] Step 15:
[0331] Question and answer adjustment
[0332] Server: Uses information from the emotion engine to tailor the content and method of question-answering, providing detailed explanations for frustrated users and supportive feedback for those lacking confidence.
[0333] Step 16:
[0334] Component description generation
[0335] Server: Based on the metadata of each component, a description that is easy to understand even for beginners is generated. The description created using natural language processing technology is displayed to the user.
[0336] Step 17:
[0337] Impact analysis of proposed changes
[0338] User: Proposes changes to the system.
[0339] Server: Analyzes the impact of the proposal on other components and calculates the extent of the impact based on the dependency graph. It also evaluates the implementation difficulty and presents it to the user.
[0340] Step 18:
[0341] Presentation of results
[0342] Terminal: The calculated impact range and implementation difficulty are displayed to the user. Based on this, the user can consider whether to make changes and the details.
[0343] These are the specific processing steps of this system. This system helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, while also providing an advanced interface that responds to the user's emotions.
[0344] Example 2
[0345] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0346] It is not easy for newcomers to quickly and accurately understand the project architecture and work efficiently. It is also difficult to provide an interface that responds to the user's emotional state, and there are few ways to alleviate user confusion and frustration. Furthermore, if changes in the repository are not updated in real time, it becomes difficult to make decisions based on the latest information. It is also difficult to accurately predict the impact of proposed changes and evaluate the difficulty of implementation.
[0347] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for recognizing a user's emotion, means for changing the visual emphasis of the architecture diagram based on the recognized emotion, means for updating the generated architecture diagram in real time, means for responding to questions from the user, means for highlighting important components on the generated architecture diagram, and means for analyzing the scope of impact and implementation difficulty of proposed changes. This allows newcomers to quickly and accurately understand the project architecture, provides an interface that responds to the user's emotional state, reduces user confusion and frustration, and reflects changes in the repository in real time, enabling evaluation of the scope of impact and implementation difficulty of proposed changes.
[0348] "Source code" is textual information describing a program before it is converted into a format that can be executed by a computer.
[0349] "Analysis" refers to analyzing and decomposing source code and data to extract characteristics such as their structure, dependencies, and behavior.
[0350] A "component" is the smallest unit element that performs a function or role in a system, and includes classes, modules, etc.
[0351] A "dependency" is a relationship in which one component depends on another component, and indicates that a change in one component may affect the other.
[0352] An "architecture diagram" is a visual representation of the structure of a system and the dependencies between its components.
[0353] "Emotion recognition" is a technology that estimates a user's emotions from facial expressions, voice, text, etc.
[0354] "Visual enhancement" refers to changing the color, size, placement, etc. of information to make it easier to see and understand.
[0355] "Real-time updates" is the process by which changes in data or state are reflected immediately.
[0356] "Question answering" is the process of providing appropriate information in response to a user's inquiry.
[0357] A "change proposal" is a proposal for an improvement or modification to an existing system or project.
[0358] The "scope of impact" is the extent to which a particular change affects which part of the entire system.
[0359] "Implementation difficulty" indicates the effort and technical difficulty required to implement a specific change or feature addition.
[0360] A "repository" is a storage system for storing and managing source code and related data and documents.
[0361] "Log analysis" is the process of analyzing a system's operation history and event logs to extract specific information.
[0362] "Frequency" is an indicator that indicates the number of times a particular event or operation occurs within a certain period of time.
[0363] "Weighting" is the process of assigning points or weights to each element according to its importance during evaluation or analysis.
[0364] This invention is a system that combines an AI-driven tool to help newcomers quickly understand the project architecture and work effectively with an emotion engine that recognizes user emotions. How to implement this system will be explained in detail below.
[0365] System Configuration
[0366] The system consists of four components: a server, a terminal (client), a user, and an emotion engine. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and recognizes user emotions. The terminal provides an interface with the user, allowing the user to operate the system and view information. The emotion engine analyzes the user's emotions and provides that information to the server.
[0367] Source code acquisition and analysis
[0368] The server clones the latest source code from the Git repository. The cloned source code is passed to a static analysis engine to extract information such as classes, methods, and dependencies. This analysis can be performed using a tool such as SonarQube. The extracted information is then stored in a MySQL database.
[0369] Generate architecture diagrams
[0370] The server automatically generates an architecture diagram based on the analysis results, using libraries such as D3.js and Graphviz to generate a visual architecture diagram, which is then displayed in the user's browser via the terminal.
[0371] Dependency Analysis
[0372] The server analyzes the dependencies between each component and stores them as a dependency graph, which is visualized on the device and made interactive by the user using D3.js.
[0373] Importance rating and highlighting
[0374] The server uses log analysis to calculate the frequency of calls to each component and calculates a criticality score based on the results. Critical components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0375] Real-time updates
[0376] To detect changes in the source code in real time, the server uses Git webhooks. Every time a change is pushed to the repository, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[0377] prompt question answer
[0378] The user inputs a question about the architecture in the form of a prompt via the terminal. The server uses a generative AI model (e.g., GPT-4) to analyze the intent of the question and generate an appropriate answer. Here is an example of a prompt:
[0379] "What is the role of this class?"
[0380] "What is the scope of the proposed changes?"
[0381] Component description generation
[0382] The server uses the metadata of each component to generate a description that is easy for beginners to understand. It uses natural language processing (NLP) techniques to create the description, which is then displayed on the user's device. For example, if a user asks about the role of a particular class, the server uses the metadata to generate the following description:
[0383] This class is responsible for user management functions, adding, updating, and deleting user information.
[0384] Impact analysis of proposed changes
[0385] When a user proposes a change, the server analyzes the scope of the change. It calculates the scope of the impact based on the dependency graph and evaluates the impact of the proposal on other components and the difficulty of implementation. The results are displayed on the user's device.
[0386] Combining Emotion Engines
[0387] The emotion engine analyzes emotions from the user's facial expressions, voice tone, input content, etc. The analyzed emotion information is sent to the server and used for various processes. For example, if the user is confused, the server will further highlight important components and add guide messages. If the user is frustrated, it will provide more polite and detailed explanations.
[0388] In this way, it is possible to implement a system that not only helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, but also provides an advanced interface that takes user emotions into consideration.
[0389] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0390] Program processing flow
[0391] Step 1: Get the source code
[0392] Specific behavior:
[0393] A user accesses the system and requests to obtain the source code.
[0394] Input: Git repository URL
[0395] Output: Retrieved source code
[0396] explanation:
[0397] The server receives the Git repository URL provided by the user and then executes the "git clone https: / / example-repo-url" command to clone the latest source code locally, which will be used for subsequent analysis.
[0398] Step 2: Static Analysis
[0399] Specific behavior:
[0400] The server passes the cloned source code to a static analysis engine.
[0401] Input: Retrieved source code
[0402] Output: Parsed information (classes, methods, dependencies)
[0403] explanation:
[0404] The server uses static analysis tools such as SonarQube to extract information such as classes, methods, and dependencies from the source code, and the results of this analysis are stored in a database.
[0405] Step 3: Saving to the database
[0406] Specific behavior:
[0407] The server stores the analysis results in an internal database.
[0408] Input: Parsed information
[0409] Output: Store in database
[0410] explanation:
[0411] The analyzed information is stored in a MySQL database by executing the SQL query "INSERT INTO analysis_results (class, method, dependency) VALUES (...)".
[0412] Step 4: Generate an architecture diagram
[0413] Specific behavior:
[0414] The server generates architecture diagrams using D3.js and Graphviz.
[0415] Input: Analysis results in the database
[0416] Output: Architecture diagram
[0417] explanation:
[0418] The server uses the information stored in the database to structure the dependencies between components as a graph, then uses D3.js or Graphviz to generate a visual architecture diagram and send it to the user's browser.
[0419] Step 5: Emotion Recognition
[0420] Specific behavior:
[0421] The terminal transmits the user's facial expressions and voice to the emotion engine.
[0422] Input: User's facial expressions, voice, and input
[0423] Output: Emotional information
[0424] explanation:
[0425] The device uses a camera and microphone to capture the user's facial expressions and voice, and sends them to the emotion engine. The emotion engine analyzes this data and identifies the user's current emotion (e.g., confusion, irritation). The emotion information is then sent to the server.
[0426] Step 6: Adjusting visual highlighting
[0427] Specific behavior:
[0428] The server adjusts the visual emphasis of the architecture diagram based on the affective information.
[0429] Input: Emotion information, Architecture diagram
[0430] Output: Reconciled architecture diagram
[0431] explanation:
[0432] The server adjusts the visual emphasis of the architecture diagram based on the emotional information received from the emotion engine. For example, if the user is confused, it further highlights important components and adds guide messages to help the user understand.
[0433] Step 7: Real-time updates
[0434] Specific behavior:
[0435] The server uses Git webhooks to detect changes in the repository.
[0436] Input: Repository change notifications
[0437] Output: Updated architecture diagram
[0438] explanation:
[0439] The server sets up web hooks in the Git repository, and when it receives change notifications, it re-analyzes the source code, generates a new architecture diagram including the dependency changes, and sends it to the terminal via WebSocket, updating the diagram in the browser in real time.
[0440] Step 8: Prompt Question Response
[0441] Specific behavior:
[0442] A user inputs a question to the system via a terminal.
[0443] Input: prompt statement
[0444] Output: Answer to the question
[0445] explanation:
[0446] The user inputs a prompt sentence via the terminal, such as a question like, "What is the role of this class?" The server uses a generative AI model (e.g., GPT-4) to analyze the intent of the question, generate an appropriate answer, and provide it to the user.
[0447] Step 9: Generate component descriptions
[0448] Specific behavior:
[0449] The server generates component descriptions using NLP techniques.
[0450] Input: Component metadata
[0451] Output:Description
[0452] explanation:
[0453] The server generates a description based on the metadata of each component that is easy to understand even for beginners. The description is automatically generated using natural language processing (NLP) technology and displayed on the user's device. For example, if a user asks about a specific class, the description displayed is, "This class is responsible for user management functions, and adds, updates, and deletes user information."
[0454] Step 10: Impact analysis of proposed changes
[0455] Specific behavior:
[0456] The user makes change suggestions via the terminal.
[0457] Input: Proposed changes
[0458] Output: Assessment of impact scope and implementation difficulty
[0459] explanation:
[0460] When a user inputs a proposed change, the server analyzes the scope of impact based on the dependency graph. For example, if a proposal is made to "change this method," the server identifies the affected components from the dependency graph and evaluates the difficulty of implementation. The results are displayed on the user's device, providing information such as "This change may affect five modules."
[0461] The above are the specific processing steps and specific operations of the system program.
[0462] (Application example 2)
[0463] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart device 14 will be referred to as a "terminal."
[0464] The challenge is that it is difficult for newcomers to quickly understand the architecture of the equipment and systems within the factory and carry out their work effectively. Another problem is the lack of means to reduce stress and confusion for workers and provide efficient support.
[0465] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from users, means for highlighting important components on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty when proposing changes, and means for analyzing user emotions using an emotion engine and adjusting system behavior using the analyzed emotion information. This enables newcomers and workers to quickly and effectively understand the architecture of equipment and systems in a factory, and the emotion engine can reduce stress and confusion.
[0466] "Source code" is the programming language text written by a developer to design and implement a software program.
[0467] A "component" is an independently functioning unit or part within a system or architecture.
[0468] A "dependency" refers to a relationship in which one component depends on the functionality or data of another component.
[0469] An "architecture diagram" is a visual representation of the components of a system or application and their interrelationships.
[0470] "Real-time" refers to a state in which processing and information updates are carried out immediately without delay.
[0471] An "emotion engine" is a technology that analyzes the user's emotions and adjusts the system's behavior based on that information.
[0472] "Question answering" is a function that automatically provides appropriate answers to questions from users.
[0473] "Importance" refers to the relative importance or influence of a component within a system.
[0474] A "change proposal" is a proposed modification or improvement to the current system or architecture.
[0475] "Scope of impact" refers to the extent to which a proposed change will affect the entire system.
[0476] "Implementation difficulty" refers to the difficulty or effort required to introduce the proposed change into the system.
[0477] A "dependency graph" is a graph that visually represents the dependencies between components.
[0478] This invention is a system for quickly understanding the architecture of equipment and systems in a factory and efficiently carrying out business operations. This system acquires and analyzes source code, extracts dependencies, generates architecture diagrams, updates them in real time, answers questions, evaluates importance, analyzes the scope of impact of proposed changes, and analyzes and adjusts user emotions using an emotion engine.
[0479] System Configuration
[0480] The system consists of four main components: a server, a terminal (client), a user, and an emotion engine.
[0481] Server: The server retrieves and analyzes source code, generates architecture diagrams, analyzes dependencies, assesses importance, provides real-time updates, answers questions, analyzes the scope of impact of proposed changes, and recognizes user emotions.
[0482] Terminal: A terminal is a device that provides an interface with a user and allows the user to operate the system or view information. For example, a tablet used by a factory worker.
[0483] Emotion Engine: The emotion engine analyzes the user's voice tone and facial expression data in real time and provides that information to the server.
[0484] Users: The users are the factory workers and engineers who use this system.
[0485] Program processing and technologies used
[0486] The server processes and calculates various data using the following technologies:
[0487] Hardware used
[0488] Tablets used by factory workers
[0489] Factory surveillance cameras (for emotion recognition)
[0490] Server (backend for source code contracts, theory analysis, sentiment analysis)
[0491] Software used
[0492] Git (GitPython): Get and clone source code.
[0493] D3.js / Graphviz: Generating architecture diagrams.
[0494] NLPEngine (Python NLP library): Natural language processing for question answering.
[0495] EmotionEngine (Python emotion recognition library): Analyzes worker emotions.
[0496] WebSocketServer (Python WebSocket library): Real-time update notifications.
[0497] The server first clones the source code from the specified repository and performs static analysis. This static analysis extracts information such as classes, methods, and dependencies, and stores it in an internal database. Next, an architecture diagram is automatically generated based on the analysis results. D3.js and Graphviz are used to generate a visually appealing and easy-to-use diagram. The architecture diagram is then displayed in the user's browser via the terminal.
[0498] The server also uses Git webhooks to detect source code changes in real time. Each time a change is pushed, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[0499] Users can enter architectural questions in a prompt format via the terminal, and the server uses an NLP engine to analyze the intent of the question and generate appropriate answers, searching for relevant component information and dependencies to provide the answer to the user.
[0500] The emotion engine analyzes the user's voice tone and facial expression data in real time and provides the emotion to the server. For example, if the user is confused, the server will further emphasize important components and add guide messages. When the user asks a question, it will provide appropriate and easy-to-understand answers according to the user's emotion.
[0501] Example: Prompt sentence example
[0502] For example, you can input the AI model using the following prompt sentence:
[0503] "I'd like to see a new wiring diagram. Could you please tell me in detail which wires are connected to which parts?"
[0504] The system enables newcomers and workers to quickly and effectively understand the architecture of equipment and systems within a factory, while its emotion engine helps reduce stress and confusion.
[0505] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[0506] Step 1:
[0507] The server clones the latest source code from a specified repository. The input is the repository URL and authentication information. The output is a local copy of the cloned source code, which is then passed to the analysis engine. Specifically, it uses the GitPython library to retrieve the source code from the Git repository.
[0508] Step 2:
[0509] The server statically analyzes the cloned source code. The input is the cloned source code, and the output is information such as extracted classes, methods, and dependencies. Specifically, the static analysis engine analyzes the source code and stores the necessary metadata in an internal database.
[0510] Step 3:
[0511] The server generates an architecture diagram based on the analysis results. The input is the output of static analysis, and the output is a visualized architecture diagram. Specifically, it uses D3.js and Graphviz to create a graph structure and convert it into a diagram that can be displayed visually.
[0512] Step 4:
[0513] The server updates the generated architecture diagram in real time. The input is change notifications from the repository, and the output is the updated architecture diagram. Specifically, it uses Git web hooks to detect changes in the repository and sends update notifications to the terminal via WebSocket.
[0514] Step 5:
[0515] A user accesses the system via a terminal and views the architecture diagram. The input is the user's viewing request, and the output is the architecture diagram displayed in the browser. Specifically, the terminal receives update notifications from the server via WebSocket and automatically updates the architecture diagram on the browser.
[0516] Step 6:
[0517] The user inputs a question about the architecture in the form of a prompt via the terminal. The input is the user's question text, and the output is the answer text from the server. Specifically, the user's question is passed to an NLP engine, which analyzes it and generates an appropriate answer.
[0518] Step 7:
[0519] The server highlights important components. The input is the frequency of component use and the number of connections, and the output is a visually highlighted architecture diagram. Specifically, it uses log analysis to calculate the frequency of component calls, and calculates an importance score based on the result, which is reflected in the visualized diagram.
[0520] Step 8:
[0521] When a user proposes a change, the server analyzes its impact. The input is the user's proposed change text, and the output is an evaluation of the impact and implementation difficulty. Specifically, the server calculates the impact based on the dependency graph and evaluates the impact of the proposal on other components and the implementation difficulty.
[0522] Step 9:
[0523] The emotion engine analyzes the user's emotions. The input is the user's voice tone and facial expression data, and the output is analyzed emotional information. Specifically, it uses voice and image analysis technology to recognize the user's emotions in real time and provides that information to the server.
[0524] Step 10:
[0525] The server adjusts the system's behavior based on information from the emotion engine. The input is emotion information from the emotion engine, and the output is appropriate feedback and guidance messages for the user. Specifically, if the user is confused, the server further highlights important components and adds guidance messages.
[0526] The specific processing unit 290 transmits the result of the specific processing to the smart device 14. In the smart device 14, the control unit 46A causes the output device 40 to output the result of the specific processing. The microphone 38B acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 38B to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[0527] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[0528] In the above embodiment, an example in which the specific process is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific process may be performed by the smart device 14.
[0529] [Second embodiment]
[0530] FIG. 3 shows an example of the configuration of a data processing system 210 according to the second embodiment.
[0531] 3, the data processing system 210 includes the data processing device 12 and smart glasses 214. An example of the data processing device 12 is a server.
[0532] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[0533] The smart glasses 214 include a computer 36, a microphone 238, a speaker 240, a camera 42, and a communication I / F 44. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, and the camera 42 are also connected to the bus 52.
[0534] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[0535] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[0536] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[0537] Fig. 4 shows an example of the main functions of the data processing device 12 and the smart glasses 214. As shown in Fig. 4, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[0538] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[0539] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[0540] In the smart glasses 214, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[0541] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the smart glasses 214 will be referred to as the "terminal."
[0542] This invention is an AI-driven tool that enables newcomers to quickly understand the architecture of a project and proceed with their work effectively. A specific embodiment of this system will be described below.
[0543] System Configuration
[0544] The system consists of three components: a server, a terminal (client), and a user. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface to the user, allowing the user to operate the system and view information.
[0545] Program processing
[0546] Source code acquisition and analysis
[0547] To obtain the source code of a project, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine to extract information such as classes, methods, and dependencies. This information is stored in an internal database.
[0548] Generate architecture diagrams
[0549] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js or Graphviz. This diagram is displayed in the user's browser via the terminal.
[0550] Dependency Analysis
[0551] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[0552] Importance rating and highlighting
[0553] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0554] Real-time updates
[0555] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[0556] prompt question answer
[0557] Users can input questions about architecture via their devices. The server analyzes the questions using natural language processing (NLP) and generates appropriate answers from the analysis results. The generated answers are displayed on the user's device.
[0558] Component description generation
[0559] The server automatically generates a description for each component. It uses natural language processing technology to create the description based on the component's metadata (role, dependencies, use cases, etc.). The created description is then displayed on the device for the user to view.
[0560] Impact analysis of proposed changes
[0561] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's device.
[0562] Specific examples
[0563] For example, consider a user starting a new project and trying to understand the architecture of an existing system. The user accesses the tool via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram, highlighting important components. When the user asks a question about a specific component, the server instantly generates an answer and displays it on the terminal.
[0564] Furthermore, when a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, allowing the user to understand the impact of the proposal in advance and make more careful and efficient changes.
[0565] The above is an embodiment of the present invention. This system is a powerful tool that enables new participants and stakeholders to quickly and accurately understand a project and to carry out their work effectively.
[0566] The processing flow will be explained below.
[0567] Step 1:
[0568] Get the source code
[0569] Server: Obtains the latest source code from the project repository. Specifically, it uses the Git repository URL and clones the repository to a local environment using the git clone command or API. This retrieval process is performed periodically or triggered by a user request.
[0570] Step 2:
[0571] Source code analysis
[0572] Server: The cloned source code is passed to the analysis engine. Specifically, static analysis tools are used to analyze classes, methods, and dependencies. The analysis results are extracted as relationships and metadata for each component.
[0573] Step 3:
[0574] Saving to a database
[0575] Server: Stores the analysis results in an internal database, specifically a NoSQL database that stores component information and dependency data for future reference and analysis.
[0576] Step 4:
[0577] Generate architecture diagrams
[0578] Server: Generates an architecture diagram based on the saved analysis results. Specifically, it uses libraries such as D3.js and Graphviz to visually represent the analysis data. The generated diagram can be manipulated interactively by the user.
[0579] Step 5:
[0580] Dependency Analysis
[0581] Server: Further analyzes the dependencies between each component. Specifically, based on the analyzed dependency data, a dependency graph is created and the parent-child relationships between each node (component) are clarified.
[0582] Step 6:
[0583] Importance rating and highlighting
[0584] Server: Evaluates the importance of each component based on frequency of use and number of connections. Specifically, it analyzes log files and counts the frequency of calls to each component. Based on the results, it calculates an importance score and highlights important components on the architecture diagram by changing color and size.
[0585] Step 7:
[0586] Real-time update settings
[0587] Server: Set up a mechanism to detect source code changes in real time. Specifically, it uses Git webhooks to trigger analysis and diagram updates when changes are pushed to the repository.
[0588] Step 8:
[0589] Real-time updates
[0590] Server: When a change is detected, the source code is analyzed again, the architecture diagram is updated, and the results are sent to the client in real time.
[0591] Terminal: Receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[0592] Step 9:
[0593] prompt question answer
[0594] User: Enter architecture questions in a prompt format.
[0595] Server: Uses AI models to analyze the intent of the question and generate appropriate answers. Searches for relevant component information and dependencies to automatically generate answers.
[0596] Terminal: Displays the answer received from the server to the user.
[0597] Step 10:
[0598] Component description generation
[0599] Server: Based on the metadata of each component, it generates a description that is easy to understand even for beginners. Specifically, it uses NLP technology to automatically create the description.
[0600] Terminal: Display the generated description to the user.
[0601] Step 11:
[0602] Impact analysis of proposed changes
[0603] User: Submits system change proposals to the server.
[0604] Server: Analyzes the impact of the proposed change on other components. Specifically, it calculates the scope of impact based on the dependency graph and evaluates the components affected by the change and the difficulty of implementing it.
[0605] Terminal: Presents the calculated impact range and implementation difficulty to the user.
[0606] These are the specific processing steps in the program of this system. This system enables new participants and stakeholders to quickly and accurately understand the project and carry out their work efficiently.
[0607] Example 1
[0608] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0609] With conventional technology, it was difficult for newcomers to quickly understand the overall architecture of a project and proceed with their work effectively. In addition, there was an insufficient means to grasp in real time the impact that source code changes would have on the entire project, making it difficult to manage the risks associated with changes.
[0610] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[0611] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between program elements, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user using natural language processing, means for highlighting important program elements on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes when a change is made, and means for calculating the frequency of use of each program element using log analysis. This enables newcomers to quickly grasp the overall picture of the project and to understand in real time the impact that changes to the source code will have on the entire project.
[0612] "Source code" is the text that describes a program and is converted into binary code that can be executed by a computer.
[0613] A "server" is a computer system that provides services over a network. In this case, it analyzes source code and generates architecture diagrams.
[0614] The "means of retrieval" refers to the mechanism for retrieving source code from a specified repository. This mainly includes the Git client.
[0615] "Means of analysis" refers to technologies for analyzing the contents of source code and extracting program elements and their dependencies. This includes static analysis engines.
[0616] A "program element" refers to an individual component in source code, and specifically includes classes, methods, variables, etc.
[0617] A "dependency" refers to a relationship of mutual dependence between program elements. For example, when one class calls another class, a dependency exists between them.
[0618] An "architecture diagram" is a visual representation of the structure of a software system and the relationships between its components.
[0619] "Means for real-time updates" refers to a mechanism for instantly detecting changes in source code and simultaneously updating the corresponding architecture diagrams. This mainly includes web hooks and WebSockets.
[0620] "Natural language processing" is a technique that allows computers to understand human language. Here, it is used to generate appropriate responses to user questions.
[0621] "Important program elements" refer to elements that have a particularly high impact or frequency of use within the entire system.
[0622] "Highlighting methods" are mechanisms used to visually highlight important program elements, including changes in color and size.
[0623] "Change Proposal" means a proposal to make new modifications or additions to an existing program.
[0624] "Scope of impact" refers to the extent to which a proposed change will affect the entire system.
[0625] "Implementation difficulty" indicates the technical difficulty and effort required to implement the proposed change.
[0626] "Log analysis" is a technique for analyzing a system's operation history and identifying specific patterns and frequency of use.
[0627] This invention is an AI-driven tool that helps newcomers quickly understand the project architecture and work effectively. The system consists of three entities: a server, a terminal, and a user.
[0628] System configuration
[0629] The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface for users, allowing them to operate the system and view information.
[0630] Hardware and software used
[0631] Server: A high-performance computer system (e.g., a cloud server)
[0632] Hardware: The server has a CPU, RAM, and SSD.
[0633] software:
[0634] Git client: Used to get the source code
[0635] Static analysis engines: SonarQube, ESLint, etc.
[0636] Graph generation: D3.js, Graphviz
[0637] Log analysis: Logstash, Kibana
[0638] Natural Language Processing Engines: GPT-3, BERT
[0639] WebSocket: Real-time update notifications
[0640] Webhooks: Git change monitoring
[0641] Program processing
[0642] Get the source code
[0643] The server clones the source code from the Git repository specified by the user, and the latest source code for the project is stored on the server.
[0644] Source Code Analysis
[0645] The source code is analyzed using a static analysis engine (e.g. SonarQube or ESLint) to extract dependencies between program elements, and this information is stored in an internal database.
[0646] Generate architecture diagrams
[0647] The server generates an architecture diagram based on the analysis results, for example, using D3.js or Graphviz to create a visual diagram, which is then displayed in the user's browser via the terminal.
[0648] Dependency Analysis
[0649] The server analyzes the dependencies between each program element and stores the results as a dependency graph, which can be visualized on the terminal and manipulated interactively by the user.
[0650] Importance rating and highlighting
[0651] The server uses log analysis tools (e.g., Logstash and Kibana) to calculate the frequency of use and number of connections for each program element and evaluate its importance. The evaluation results are highlighted by color and size and reflected in the architecture diagram.
[0652] Real-time updates
[0653] The server uses Git web hooks to detect changes in the source code in real time and immediately update the architecture diagram, while the terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[0654] Question and Answer Function
[0655] A user can enter a question about the architecture via the terminal, for example, "Can you tell me more about a specific class A?" The server uses a natural language processing engine (e.g., GPT-3 or BERT) to analyze the question and generate an appropriate answer, which is then displayed on the terminal.
[0656] Automatic generation of component descriptions
[0657] The server automatically generates descriptions for each program element based on the component's metadata (roles, dependencies, use cases, etc.) using natural language processing technology, and displays the descriptions on the terminal.
[0658] Impact analysis of proposed changes
[0659] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, if a user inputs "Please analyze the scope of impact if a new method C is added to class B," the server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal.
[0660] Specific examples
[0661] For example, if a user is starting a new project and wants to understand the architecture of an existing system, they access the tool via their terminal and begin the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important program elements. When the user asks a question about a specific program element, the server instantly generates an answer and displays it on the terminal. Furthermore, when the user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, and provides information based on that analysis to the terminal.
[0662] Prompt Sentence Examples
[0663] "Please describe the project architecture, highlighting the most important program elements."
[0664] "Give me more details about a specific class A, including any dependencies or use cases."
[0665] "Analyze the impact of specific proposed changes on other program elements."
[0666] In this way, the system provides a powerful tool for newcomers and current project members to quickly understand the overall system picture and make changes effectively.
[0667] The flow of the identification process in the first embodiment will be described with reference to FIG.
[0668] Step 1:
[0669] The server retrieves the latest source code from the Git repository specified by the user. Specifically, the user enters the repository URL via the terminal, and based on the input information, the server clones the repository using a Git client and retrieves the source code. This retrieved source code is stored in the server's storage.
[0670] Step 2:
[0671] The server sends the acquired source code to a static analysis engine (e.g., SonarQube, ESLint) to perform the analysis. The analysis engine analyzes the source code and extracts program elements such as classes, methods, and variables, as well as their dependencies. The analysis results are stored in the server's internal database. The input is the source code, and the output is the analysis results (program elements and dependencies).
[0672] Step 3:
[0673] The server automatically generates an architecture diagram based on the analysis results. To do this, the server converts the dependency information into a graph structure and creates a visual architecture diagram using tools such as D3.js or Graphviz. This generated architecture diagram is displayed in the user's browser via the terminal. The input is the analysis results, and the output is the architecture diagram.
[0674] Step 4:
[0675] The server generates a dependency graph based on the dependency information and stores it in an internal database. This dependency graph consists of nodes and edges, and represents each program element and its dependencies. The terminal visualizes this dependency graph and allows the user to manipulate it interactively. The input is the analysis results, and the output is the dependency graph.
[0676] Step 5:
[0677] The server uses a log analysis tool (e.g., Logstash, Kibana) to calculate the frequency of use and number of interactions for each program element. To do this, the server analyzes the data in the log files and counts the number of times each program element is called. Based on this data, the server evaluates the importance and assigns it a score. The input is the log data, and the output is the importance score.
[0678] Step 6:
[0679] The server highlights important program elements on the architecture diagram based on their importance score. For example, it changes the color or size to visually indicate important parts to the user. This allows the user to grasp important program elements at a glance. The input is the importance score, and the output is the highlighted architecture diagram.
[0680] Step 7:
[0681] The server uses Git web hooks to detect changes to the source code in real time. When changes are pushed, the server re-analyzes and immediately updates the architecture diagram. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser. The input is the Git change notification, and the output is the updated architecture diagram.
[0682] Step 8:
[0683] A user inputs a question about the architecture via a terminal, for example, a prompt like "Tell me more about a specific class A." The server analyzes the question using a natural language processing engine (e.g., GPT-3, BERT) and generates an appropriate answer. This answer is displayed on the terminal. The input is the user's question, and the output is the answer.
[0684] Step 9:
[0685] The server automatically generates a description for each program element. Based on the component's metadata (roles, dependencies, use cases, etc.), the description is created using natural language processing technology and displayed on the terminal. For example, a description such as "Class A is a class that provides user authentication functionality and has the following methods" is generated. The input is metadata, and the output is the description.
[0686] Step 10:
[0687] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, the user might input, "Please analyze the scope of impact if a new method C is added to class B." The server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal. The input is the change proposal, and the output is the evaluation results of the scope of impact and the difficulty of implementation.
[0688] (Application example 1)
[0689] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0690] Rapidly introducing new machinery and equipment within factories and effectively performing maintenance and troubleshooting are important for improving work efficiency and ensuring safety. However, with traditional methods, it takes time for workers to understand the architecture and dependencies of new machinery, making it difficult to obtain the necessary information in real time. Furthermore, it is difficult to quickly identify critical components and grasp the impact of proposed changes, reducing work efficiency.
[0691] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[0692] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user, means for highlighting important components on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes, and means for displaying visualized information on a smart device to support maintenance work of industrial equipment. This enables workers to quickly understand the architecture of new machines and facilities, obtain necessary information in real time, and significantly improve the efficiency of maintenance and troubleshooting.
[0693] "Source code" refers to program code written to implement the functionality of a computer program or system.
[0694] "Analysis" is the process of examining acquired source code and data in detail to clarify their structure, dependencies, etc.
[0695] "Component dependencies" are relationships that show how each part (component) of a software or system depends on other parts.
[0696] An "architecture diagram" is a visual representation of the overall structure of a system or program, showing the relationships and arrangement of components.
[0697] "Real-time updates" means that when a system or data is changed, the changes are reflected immediately and the latest information is provided.
[0698] "Responding to a question" refers to the process of providing an appropriate answer to a user's inquiry.
[0699] "Highlighting" refers to a display method that uses color, size, etc. to make specific information or components stand out.
[0700] The "scope of impact of proposed changes" refers to the scope that indicates how the changes proposed by the user will affect the entire system or program.
[0701] "Implementation difficulty" refers to the difficulty or complexity of actually incorporating the changes proposed by the user into a system or program.
[0702] "Visualized information" refers to data or analytical results presented in a visual format such as a chart or graph.
[0703] A "smart device" is an electronic device with advanced functionality that can connect to the Internet and run a variety of applications.
[0704] "Industrial equipment maintenance work" refers to the work of inspecting, repairing, and maintaining machinery and equipment used in fields such as manufacturing and heavy industry.
[0705] This invention is an AI-driven tool that enables newcomers to quickly understand project architecture and proceed with their work effectively. This invention will be described as being applied as an application for smart devices to support maintenance work on industrial equipment in factories.
[0706] System Configuration
[0707] The system consists of three components: a server, a terminal (smart device), and a user. The server retrieves and analyzes source code, generates architecture diagrams, analyzes dependencies, assesses importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and generates visualized information. The terminal includes a smart device (e.g., smart glasses) and provides an interface to the user, allowing the user to operate the system and view information.
[0708] Program processing
[0709] 1. Obtaining and analyzing the source code
[0710] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine (e.g., SonarQube) to extract information such as classes, methods, and dependencies. This information is then stored in an internal database (e.g., MySQL).
[0711] 2. Generating an architecture diagram
[0712] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js and Graphviz. This diagram is displayed on the user's smart glasses via the device.
[0713] 3. Dependency Analysis
[0714] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the smart glasses and manipulated interactively by the user.
[0715] 4. Importance rating and highlighting
[0716] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0717] 5. Real-time updates
[0718] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The device receives update notifications via WebSocket and automatically updates the diagram on the smart glasses.
[0719] 6. Question-Answering System
[0720] Users can input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers from the analysis results. This process uses the Google Cloud Natural Language API and other tools. The generated answers are displayed on the user's smart glasses.
[0721] 7. Generating Visualized Information
[0722] Based on the metadata of the components (roles, dependencies, use cases, etc.), the server automatically generates a description using natural language processing technology, which is then displayed for the user to view through the smart glasses.
[0723] 8. Impact Analysis of Proposed Changes
[0724] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's smart glasses.
[0725] Specific examples
[0726] For example, consider a newly installed automated welding robot in a factory. When a worker puts on smart glasses and starts maintenance on the robot, the smart glasses display shows the following information:
[0727] 1. Machine architecture diagram: Visually confirm the internal structure of the automatic welding robot and the layout of its main components.
[0728] 2. Importance highlighting: Important parts are highlighted by color and size based on frequency of use and number of connections.
[0729] 3. Dependency analysis results: The dependencies between components are displayed as a graph, making it easier to identify faults and prioritize repairs.
[0730] 4. Real-time updates: Any changes or anomalies made during work are reflected immediately, and new information is updated in real time.
[0731] 5. Question-answering system: In response to a voice question such as "What role does this sensor play?", an answer such as "This is a sensor that monitors the welding temperature" is instantly displayed.
[0732] Example prompts to input to a generative AI model:
[0733] "Please tell me the role of the welding head sensor on the newly installed automatic welding robot."
[0734] The above is an embodiment of the present invention. This system is a powerful tool that allows newcomers and stakeholders to quickly and accurately understand projects and machines and carry out their work effectively.
[0735] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[0736] Step 1: Get the source code
[0737] The server will clone the latest source code from the Git repository to get the source code of the project. This step takes the Git repository URL as input and gets the cloned source code as output. The cloned source code will be saved in a local directory on the server.
[0738] Step 2: Analyzing the source code
[0739] The server performs static analysis of the cloned source code using an analysis engine (e.g., SonarQube). This static analysis extracts information such as classes, methods, and dependencies. The input data is the source code obtained in step 1, and the output is metadata of the analysis results. This metadata is stored in an internal database (e.g., MySQL).
[0740] Step 3: Generate an architecture diagram
[0741] The server automatically generates an architecture diagram based on the analysis results. Here, D3.js and Graphviz are used to visually represent the graph structure. The input data is the dependency information extracted in step 2, and the generated architecture diagram is obtained as the output. This architecture diagram is sent to the smart glasses terminal.
[0742] Step 4: Save the dependency analysis results
[0743] The server analyzes the dependencies between components as a dependency graph and stores the results in a database. The input data is the analysis metadata, and the output is a dependency graph, which can be visualized on the device.
[0744] Step 5: Assess and highlight importance
[0745] The server analyzes logs and calculates the importance of each component based on its frequency of use and the number of connections. The input data is the log file and analysis metadata, and the output is an importance score. Important components are highlighted by color and size and reflected in the architecture diagram.
[0746] Step 6: Real-time updates
[0747] The server uses Git web hooks to detect changes in the source code in real time. The input data is notification of the changes, and the output is updated information on the architecture diagram. This updated information is sent via WebSocket to the smart glasses and is reflected visually.
[0748] Step 7: Operate the Q&A system
[0749] Users input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers. The input data is the voice question, and the output is an answer based on the analysis results. The answer is displayed on the smart glasses.
[0750] Step 8: Generate visualizations
[0751] The server automatically generates a description based on the metadata of the component using natural language processing technology. The input data is the metadata, and the generated description is obtained as output. This description can be viewed using smart glasses.
[0752] Step 9: Impact analysis of proposed changes
[0753] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the impact of the proposal on other components and calculates the difficulty of implementation. The input data is the proposed change, and the output is the scope of impact and the difficulty of implementation. This information is displayed on the smart glasses.
[0754] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[0755] This invention is a system that combines an AI-driven tool that enables newcomers to quickly understand the project architecture and effectively proceed with their work with an emotion engine that recognizes the user's emotions. A specific embodiment of this system will be described below.
[0756] System Configuration
[0757] The system consists of four components: a server, a terminal (client), a user, and an emotion engine. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and recognizes user emotions. The terminal provides an interface with the user, allowing the user to operate the system and view information. The emotion engine analyzes the user's emotions and provides that information to the server.
[0758] Program processing
[0759] Source code acquisition and analysis
[0760] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is passed to the analysis engine, which performs static analysis and extracts information such as classes, methods, and dependencies. This information is stored in an internal database.
[0761] Generate architecture diagrams
[0762] Based on the analysis results, the server automatically generates an architecture diagram. A graph structure is created based on the extracted dependencies. A visual architecture diagram is generated using libraries such as D3.js and Graphviz, and this diagram is displayed in the user's browser via the terminal.
[0763] Dependency Analysis
[0764] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[0765] Importance rating and highlighting
[0766] The server evaluates the importance of each component based on frequency of use and number of connections. Log analysis is used to calculate the frequency of calls to each component, and an importance score is calculated based on the results. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0767] Real-time updates
[0768] To detect changes in the source code in real time, the server uses Git webhooks. Every time a change is pushed to the repository, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[0769] prompt question answer
[0770] Users input architectural questions in a prompt format via their terminal, and the server uses an AI model to analyze the intent of the question and generate an appropriate answer, searching for relevant component information and dependencies, and providing the answer to the user.
[0771] Component description generation
[0772] The server generates a description based on the metadata of each component, making it easy for even beginners to understand. The description is automatically created using natural language processing (NLP) technology, and the created description is displayed on the user's device.
[0773] Impact analysis of proposed changes
[0774] When a user proposes a change, the server analyzes the scope of the change. It calculates the scope of the impact based on the dependency graph and evaluates the impact of the proposal on other components and the difficulty of implementation. The results are displayed on the user's device.
[0775] Combining Emotion Engines
[0776] emotion recognition
[0777] The emotion engine analyzes emotions from the user's facial expressions, tone of voice, input content, etc. The analyzed emotion information is sent to the server and used for various processes.
[0778] Changing visual emphasis
[0779] The server uses information from the emotion engine to change the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it can further highlight important components or add guide messages to help the user understand.
[0780] Question and answer adjustment
[0781] The server uses information from the emotion engine to adjust the content and method of question and answering. For example, if the user is frustrated, it can provide more polite and detailed explanations to reduce the user's stress. Also, if the emotion engine detects that the user is excited, it can present more proactive suggestions and next learning steps.
[0782] Specific examples
[0783] For example, consider a situation where a user is newly entering a system and trying to understand its existing architecture. The user accesses the system via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important components. In addition, if the emotion engine detects the user's confusion, the server further highlights important components and adds guide messages. When the user asks a question about a specific component, the server uses the information from the emotion engine to provide an appropriate and easy-to-understand answer.
[0784] When a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of its implementation. If the emotion engine detects a lack of confidence in the user, the server provides more detailed and supportive feedback, helping the user to proceed with the proposal with confidence.
[0785] The above is an embodiment of the present invention. This system not only helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, but also provides an advanced interface that takes the user's emotions into consideration.
[0786] The processing flow will be explained below.
[0787] Step 1:
[0788] Get the source code
[0789] Server: Use the git clone command to get the latest source code from the Git repository. Specify the repository URL and download the project source code to a local directory.
[0790] Step 2:
[0791] Source code analysis
[0792] Server: The cloned source code is passed to a static analysis engine, which analyzes the code structure and extracts classes, methods, variables, and dependencies using AST (Abstract Syntax Tree) analysis.
[0793] Step 3:
[0794] Saving to a database
[0795] Server: The analysis results are stored in an internal database. The database is in NoSQL format and stores metadata for each component (such as name, type, and dependencies) as a document.
[0796] Step 4:
[0797] Generate architecture diagrams
[0798] Server: Creates a graph structure based on the stored analysis data and generates an architecture diagram using D3.js or Graphviz. The diagram is sent to the client as JSON.
[0799] Step 5:
[0800] View the architecture diagram
[0801] Terminal: When a user accesses the system using a browser, the generated architecture diagram is displayed, allowing the user to interact with the diagram and view detailed information.
[0802] Step 6:
[0803] Dependency Analysis
[0804] Server: Analyze dependencies between components in detail. Create a dependency graph and explicitly define the relationships between each node and edge. This graph helps visualize the system and understand the dependencies.
[0805] Step 7:
[0806] Importance rating and highlighting
[0807] Server: Evaluate the importance of components based on frequency of use and number of interactions. Perform log analysis to tally the number of calls and interactions for each component. Highlight components on the architecture diagram using color and size according to their importance.
[0808] Step 8:
[0809] Real-time update settings
[0810] Server: Set up Git webhooks to automatically trigger analysis and diagram updates when changes are pushed to the repository, ensuring you always have the latest information.
[0811] Step 9:
[0812] Real-time updates
[0813] Terminal: Receives update notifications via WebSocket and updates the architecture diagram in real time, allowing users to always view the latest system information.
[0814] Step 10:
[0815] prompt question answer
[0816] User: Enters architecture questions into a form in a browser.
[0817] Server: Analyzes the question using a natural language processing engine and generates an appropriate answer. Searches for relevant analytical data and documents to generate the answer.
[0818] Step 11:
[0819] Show Answers
[0820] Terminal: Displays the generated answer to the user. The answer is displayed in the appropriate section of the interface to aid the user in understanding.
[0821] Step 12:
[0822] Emotion recognition
[0823] Terminal: Sends the user's facial expressions, tone of voice, input content, etc. to the emotion engine.
[0824] Emotion engine: Analyzes this data and determines the user's emotional state (e.g., confusion, irritation, confidence, etc.).
[0825] Step 13:
[0826] Sending emotional data
[0827] Emotion Engine: Sends the analyzed emotion data to the server, which combines this information with other processing to improve the user experience.
[0828] Step 14:
[0829] Changing visual emphasis
[0830] Server: Based on information from the emotion engine, it changes the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it further highlights important components and adds auxiliary guide messages.
[0831] Step 15:
[0832] Question and answer adjustment
[0833] Server: Uses information from the emotion engine to tailor the content and method of question-answering, providing detailed explanations for frustrated users and supportive feedback for those lacking confidence.
[0834] Step 16:
[0835] Component description generation
[0836] Server: Based on the metadata of each component, a description that is easy to understand even for beginners is generated. The description created using natural language processing technology is displayed to the user.
[0837] Step 17:
[0838] Impact analysis of proposed changes
[0839] User: Proposes changes to the system.
[0840] Server: Analyzes the impact of the proposal on other components and calculates the extent of the impact based on the dependency graph. It also evaluates the implementation difficulty and presents it to the user.
[0841] Step 18:
[0842] Presentation of results
[0843] Terminal: The calculated impact range and implementation difficulty are displayed to the user. Based on this, the user can consider whether to make changes and the details.
[0844] These are the specific processing steps of this system. This system helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, while also providing an advanced interface that responds to the user's emotions.
[0845] Example 2
[0846] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0847] It is not easy for newcomers to quickly and accurately understand the project architecture and work efficiently. It is also difficult to provide an interface that responds to the user's emotional state, and there are few ways to alleviate user confusion and frustration. Furthermore, if changes in the repository are not updated in real time, it becomes difficult to make decisions based on the latest information. It is also difficult to accurately predict the impact of proposed changes and evaluate the difficulty of implementation.
[0848] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for recognizing a user's emotion, means for changing the visual emphasis of the architecture diagram based on the recognized emotion, means for updating the generated architecture diagram in real time, means for responding to questions from the user, means for highlighting important components on the generated architecture diagram, and means for analyzing the scope of impact and implementation difficulty of proposed changes. This allows newcomers to quickly and accurately understand the project architecture, provides an interface that responds to the user's emotional state, reduces user confusion and frustration, and reflects changes in the repository in real time, enabling evaluation of the scope of impact and implementation difficulty of proposed changes.
[0849] "Source code" is textual information describing a program before it is converted into a format that can be executed by a computer.
[0850] "Analysis" refers to analyzing and decomposing source code and data to extract characteristics such as their structure, dependencies, and behavior.
[0851] A "component" is the smallest unit element that performs a function or role in a system, and includes classes, modules, etc.
[0852] A "dependency" is a relationship in which one component depends on another component, and indicates that a change in one component may affect the other.
[0853] An "architecture diagram" is a visual representation of the structure of a system and the dependencies between its components.
[0854] "Emotion recognition" is a technology that estimates a user's emotions from facial expressions, voice, text, etc.
[0855] "Visual enhancement" refers to changing the color, size, placement, etc. of information to make it easier to see and understand.
[0856] "Real-time updates" is the process by which changes in data or state are reflected immediately.
[0857] "Question answering" is the process of providing appropriate information in response to a user's inquiry.
[0858] A "change proposal" is a proposal for an improvement or modification to an existing system or project.
[0859] The "scope of impact" is the extent to which a particular change affects which part of the entire system.
[0860] "Implementation difficulty" indicates the effort and technical difficulty required to implement a specific change or feature addition.
[0861] A "repository" is a storage system for storing and managing source code and related data and documents.
[0862] "Log analysis" is the process of analyzing a system's operation history and event logs to extract specific information.
[0863] "Frequency" is an indicator that indicates the number of times a particular event or operation occurs within a certain period of time.
[0864] "Weighting" is the process of assigning points or weights to each element according to its importance during evaluation or analysis.
[0865] This invention is a system that combines an AI-driven tool to help newcomers quickly understand the project architecture and work effectively with an emotion engine that recognizes user emotions. How to implement this system will be explained in detail below.
[0866] System Configuration
[0867] The system consists of four components: a server, a terminal (client), a user, and an emotion engine. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and recognizes user emotions. The terminal provides an interface with the user, allowing the user to operate the system and view information. The emotion engine analyzes the user's emotions and provides that information to the server.
[0868] Source code acquisition and analysis
[0869] The server clones the latest source code from the Git repository. The cloned source code is passed to a static analysis engine to extract information such as classes, methods, and dependencies. This analysis can be performed using a tool such as SonarQube. The extracted information is then stored in a MySQL database.
[0870] Generate architecture diagrams
[0871] The server automatically generates an architecture diagram based on the analysis results, using libraries such as D3.js and Graphviz to generate a visual architecture diagram, which is then displayed in the user's browser via the terminal.
[0872] Dependency Analysis
[0873] The server analyzes the dependencies between each component and stores them as a dependency graph, which is visualized on the device and made interactive by the user using D3.js.
[0874] Importance rating and highlighting
[0875] The server uses log analysis to calculate the frequency of calls to each component and calculates a criticality score based on the results. Critical components are highlighted by color and size, and reflected in the visualized architecture diagram.
[0876] Real-time updates
[0877] To detect changes in the source code in real time, the server uses Git webhooks. Every time a change is pushed to the repository, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[0878] prompt question answer
[0879] The user inputs a question about the architecture in the form of a prompt via the terminal. The server uses a generative AI model (e.g., GPT-4) to analyze the intent of the question and generate an appropriate answer. Here is an example of a prompt:
[0880] "What is the role of this class?"
[0881] "What is the scope of the proposed changes?"
[0882] Component description generation
[0883] The server uses the metadata of each component to generate a description that is easy for beginners to understand. It uses natural language processing (NLP) techniques to create the description, which is then displayed on the user's device. For example, if a user asks about the role of a particular class, the server uses the metadata to generate the following description:
[0884] This class is responsible for user management functions, adding, updating, and deleting user information.
[0885] Impact analysis of proposed changes
[0886] When a user proposes a change, the server analyzes the scope of the change. It calculates the scope of the impact based on the dependency graph and evaluates the impact of the proposal on other components and the difficulty of implementation. The results are displayed on the user's device.
[0887] Combining Emotion Engines
[0888] The emotion engine analyzes emotions from the user's facial expressions, voice tone, input content, etc. The analyzed emotion information is sent to the server and used for various processes. For example, if the user is confused, the server will further highlight important components and add guide messages. If the user is frustrated, it will provide more polite and detailed explanations.
[0889] In this way, it is possible to implement a system that not only helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, but also provides an advanced interface that takes user emotions into consideration.
[0890] The flow of the identification process in the second embodiment will be described with reference to FIG.
[0891] Program processing flow
[0892] Step 1: Get the source code
[0893] Specific behavior:
[0894] A user accesses the system and requests to obtain the source code.
[0895] Input: Git repository URL
[0896] Output: Retrieved source code
[0897] explanation:
[0898] The server receives the Git repository URL provided by the user and then executes the "git clone https: / / example-repo-url" command to clone the latest source code locally, which will be used for subsequent analysis.
[0899] Step 2: Static Analysis
[0900] Specific behavior:
[0901] The server passes the cloned source code to a static analysis engine.
[0902] Input: Retrieved source code
[0903] Output: Parsed information (classes, methods, dependencies)
[0904] explanation:
[0905] The server uses static analysis tools such as SonarQube to extract information such as classes, methods, and dependencies from the source code, and the results of this analysis are stored in a database.
[0906] Step 3: Saving to the database
[0907] Specific behavior:
[0908] The server stores the analysis results in an internal database.
[0909] Input: Parsed information
[0910] Output: Store in database
[0911] explanation:
[0912] The analyzed information is stored in a MySQL database by executing the SQL query "INSERT INTO analysis_results (class, method, dependency) VALUES (...)".
[0913] Step 4: Generate an architecture diagram
[0914] Specific behavior:
[0915] The server generates architecture diagrams using D3.js and Graphviz.
[0916] Input: Analysis results in the database
[0917] Output: Architecture diagram
[0918] explanation:
[0919] The server uses the information stored in the database to structure the dependencies between components as a graph, then uses D3.js or Graphviz to generate a visual architecture diagram and send it to the user's browser.
[0920] Step 5: Emotion Recognition
[0921] Specific behavior:
[0922] The terminal transmits the user's facial expressions and voice to the emotion engine.
[0923] Input: User's facial expressions, voice, and input
[0924] Output: Emotional information
[0925] explanation:
[0926] The device uses a camera and microphone to capture the user's facial expressions and voice, and sends them to the emotion engine. The emotion engine analyzes this data and identifies the user's current emotion (e.g., confusion, irritation). The emotion information is then sent to the server.
[0927] Step 6: Adjusting visual highlighting
[0928] Specific behavior:
[0929] The server adjusts the visual emphasis of the architecture diagram based on the affective information.
[0930] Input: Emotion information, Architecture diagram
[0931] Output: Reconciled architecture diagram
[0932] explanation:
[0933] The server adjusts the visual emphasis of the architecture diagram based on the emotional information received from the emotion engine. For example, if the user is confused, it further highlights important components and adds guide messages to help the user understand.
[0934] Step 7: Real-time updates
[0935] Specific behavior:
[0936] The server uses Git webhooks to detect changes in the repository.
[0937] Input: Repository change notifications
[0938] Output: Updated architecture diagram
[0939] explanation:
[0940] The server sets up web hooks in the Git repository, and when it receives change notifications, it re-analyzes the source code, generates a new architecture diagram including the dependency changes, and sends it to the terminal via WebSocket, updating the diagram in the browser in real time.
[0941] Step 8: Prompt Question Response
[0942] Specific behavior:
[0943] A user inputs a question to the system via a terminal.
[0944] Input: prompt statement
[0945] Output: Answer to the question
[0946] explanation:
[0947] The user inputs a prompt sentence via the terminal, such as a question like, "What is the role of this class?" The server uses a generative AI model (e.g., GPT-4) to analyze the intent of the question, generate an appropriate answer, and provide it to the user.
[0948] Step 9: Generate component descriptions
[0949] Specific behavior:
[0950] The server generates component descriptions using NLP techniques.
[0951] Input: Component metadata
[0952] Output:Description
[0953] explanation:
[0954] The server generates a description based on the metadata of each component that is easy to understand even for beginners. The description is automatically generated using natural language processing (NLP) technology and displayed on the user's device. For example, if a user asks about a specific class, the description displayed is, "This class is responsible for user management functions, and adds, updates, and deletes user information."
[0955] Step 10: Impact analysis of proposed changes
[0956] Specific behavior:
[0957] The user makes change suggestions via the terminal.
[0958] Input: Proposed changes
[0959] Output: Assessment of impact scope and implementation difficulty
[0960] explanation:
[0961] When a user inputs a proposed change, the server analyzes the scope of impact based on the dependency graph. For example, if a proposal is made to "change this method," the server identifies the affected components from the dependency graph and evaluates the difficulty of implementation. The results are displayed on the user's device, providing information such as "This change may affect five modules."
[0962] The above are the specific processing steps and specific operations of the system program.
[0963] (Application example 2)
[0964] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the smart glasses 214 will be referred to as a "terminal."
[0965] The challenge is that it is difficult for newcomers to quickly understand the architecture of the equipment and systems within the factory and carry out their work effectively. Another problem is the lack of means to reduce stress and confusion for workers and provide efficient support.
[0966] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from users, means for highlighting important components on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty when proposing changes, and means for analyzing user emotions using an emotion engine and adjusting system behavior using the analyzed emotion information. This enables newcomers and workers to quickly and effectively understand the architecture of equipment and systems in a factory, and the emotion engine can reduce stress and confusion.
[0967] "Source code" is the programming language text written by a developer to design and implement a software program.
[0968] A "component" is an independently functioning unit or part within a system or architecture.
[0969] A "dependency" refers to a relationship in which one component depends on the functionality or data of another component.
[0970] An "architecture diagram" is a visual representation of the components of a system or application and their interrelationships.
[0971] "Real-time" refers to a state in which processing and information updates are carried out immediately without delay.
[0972] An "emotion engine" is a technology that analyzes the user's emotions and adjusts the system's behavior based on that information.
[0973] "Question answering" is a function that automatically provides appropriate answers to questions from users.
[0974] "Importance" refers to the relative importance or influence of a component within a system.
[0975] A "change proposal" is a proposed modification or improvement to the current system or architecture.
[0976] "Scope of impact" refers to the extent to which a proposed change will affect the entire system.
[0977] "Implementation difficulty" refers to the difficulty or effort required to introduce the proposed change into the system.
[0978] A "dependency graph" is a graph that visually represents the dependencies between components.
[0979] This invention is a system for quickly understanding the architecture of equipment and systems in a factory and efficiently carrying out business operations. This system acquires and analyzes source code, extracts dependencies, generates architecture diagrams, updates them in real time, answers questions, evaluates importance, analyzes the scope of impact of proposed changes, and analyzes and adjusts user emotions using an emotion engine.
[0980] System Configuration
[0981] The system consists of four main components: a server, a terminal (client), a user, and an emotion engine.
[0982] Server: The server retrieves and analyzes source code, generates architecture diagrams, analyzes dependencies, assesses importance, provides real-time updates, answers questions, analyzes the scope of impact of proposed changes, and recognizes user emotions.
[0983] Terminal: A terminal is a device that provides an interface with a user and allows the user to operate the system or view information. For example, a tablet used by a factory worker.
[0984] Emotion Engine: The emotion engine analyzes the user's voice tone and facial expression data in real time and provides that information to the server.
[0985] Users: The users are the factory workers and engineers who use this system.
[0986] Program processing and technologies used
[0987] The server processes and calculates various data using the following technologies:
[0988] Hardware used
[0989] Tablets used by factory workers
[0990] Factory surveillance cameras (for emotion recognition)
[0991] Server (backend for source code contracts, theory analysis, sentiment analysis)
[0992] Software used
[0993] Git (GitPython): Get and clone source code.
[0994] D3.js / Graphviz: Generating architecture diagrams.
[0995] NLPEngine (Python NLP library): Natural language processing for question answering.
[0996] EmotionEngine (Python emotion recognition library): Analyzes worker emotions.
[0997] WebSocketServer (Python WebSocket library): Real-time update notifications.
[0998] The server first clones the source code from the specified repository and performs static analysis. This static analysis extracts information such as classes, methods, and dependencies, and stores it in an internal database. Next, an architecture diagram is automatically generated based on the analysis results. D3.js and Graphviz are used to generate a visually appealing and easy-to-use diagram. The architecture diagram is then displayed in the user's browser via the terminal.
[0999] The server also uses Git webhooks to detect source code changes in real time. Each time a change is pushed, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[1000] Users can enter architectural questions in a prompt format via the terminal, and the server uses an NLP engine to analyze the intent of the question and generate appropriate answers, searching for relevant component information and dependencies to provide the answer to the user.
[1001] The emotion engine analyzes the user's voice tone and facial expression data in real time and provides the emotion to the server. For example, if the user is confused, the server will further emphasize important components and add guide messages. When the user asks a question, it will provide appropriate and easy-to-understand answers according to the user's emotion.
[1002] Example: Prompt sentence example
[1003] For example, you can input the AI model using the following prompt sentence:
[1004] "I'd like to see a new wiring diagram. Could you please tell me in detail which wires are connected to which parts?"
[1005] The system enables newcomers and workers to quickly and effectively understand the architecture of equipment and systems within a factory, while its emotion engine helps reduce stress and confusion.
[1006] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1007] Step 1:
[1008] The server clones the latest source code from a specified repository. The input is the repository URL and authentication information. The output is a local copy of the cloned source code, which is then passed to the analysis engine. Specifically, it uses the GitPython library to retrieve the source code from the Git repository.
[1009] Step 2:
[1010] The server statically analyzes the cloned source code. The input is the cloned source code, and the output is information such as extracted classes, methods, and dependencies. Specifically, the static analysis engine analyzes the source code and stores the necessary metadata in an internal database.
[1011] Step 3:
[1012] The server generates an architecture diagram based on the analysis results. The input is the output of static analysis, and the output is a visualized architecture diagram. Specifically, it uses D3.js and Graphviz to create a graph structure and convert it into a diagram that can be displayed visually.
[1013] Step 4:
[1014] The server updates the generated architecture diagram in real time. The input is change notifications from the repository, and the output is the updated architecture diagram. Specifically, it uses Git web hooks to detect changes in the repository and sends update notifications to the terminal via WebSocket.
[1015] Step 5:
[1016] A user accesses the system via a terminal and views the architecture diagram. The input is the user's viewing request, and the output is the architecture diagram displayed in the browser. Specifically, the terminal receives update notifications from the server via WebSocket and automatically updates the architecture diagram on the browser.
[1017] Step 6:
[1018] The user inputs a question about the architecture in the form of a prompt via the terminal. The input is the user's question text, and the output is the answer text from the server. Specifically, the user's question is passed to an NLP engine, which analyzes it and generates an appropriate answer.
[1019] Step 7:
[1020] The server highlights important components. The input is the frequency of component use and the number of connections, and the output is a visually highlighted architecture diagram. Specifically, it uses log analysis to calculate the frequency of component calls, and calculates an importance score based on the result, which is reflected in the visualized diagram.
[1021] Step 8:
[1022] When a user proposes a change, the server analyzes its impact. The input is the user's proposed change text, and the output is an evaluation of the impact and implementation difficulty. Specifically, the server calculates the impact based on the dependency graph and evaluates the impact of the proposal on other components and the implementation difficulty.
[1023] Step 9:
[1024] The emotion engine analyzes the user's emotions. The input is the user's voice tone and facial expression data, and the output is analyzed emotional information. Specifically, it uses voice and image analysis technology to recognize the user's emotions in real time and provides that information to the server.
[1025] Step 10:
[1026] The server adjusts the system's behavior based on information from the emotion engine. The input is emotion information from the emotion engine, and the output is appropriate feedback and guidance messages for the user. Specifically, if the user is confused, the server further highlights important components and adds guidance messages.
[1027] The specific processing unit 290 transmits the result of the specific processing to the smart glasses 214. In the smart glasses 214, the control unit 46A causes the speaker 240 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[1028] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1029] In the above embodiment, an example in which the specific processing is performed by the data processing device 12 has been given, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the smart glasses 214.
[1030] [Third embodiment]
[1031] FIG. 5 shows an example of the configuration of a data processing system 310 according to the third embodiment.
[1032] 5, the data processing system 310 includes the data processing device 12 and a headset terminal 314. An example of the data processing device 12 is a server.
[1033] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[1034] The headset type terminal 314 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a display 343. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the display 343 are also connected to the bus 52.
[1035] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[1036] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[1037] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[1038] Fig. 6 shows an example of the main functions of the data processing device 12 and the headset type terminal 314. As shown in Fig. 6, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1039] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1040] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1041] In the headset type terminal 314, a reception output process is performed by the processor 46. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1042] Next, a description will be given of the identification process performed by the identification processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as the "server" and the headset type terminal 314 will be referred to as the "terminal."
[1043] This invention is an AI-driven tool that enables newcomers to quickly understand the architecture of a project and proceed with their work effectively. A specific embodiment of this system will be described below.
[1044] System Configuration
[1045] The system consists of three components: a server, a terminal (client), and a user. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface to the user, allowing the user to operate the system and view information.
[1046] Program processing
[1047] Source code acquisition and analysis
[1048] To obtain the source code of a project, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine to extract information such as classes, methods, and dependencies. This information is stored in an internal database.
[1049] Generate architecture diagrams
[1050] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js or Graphviz. This diagram is displayed in the user's browser via the terminal.
[1051] Dependency Analysis
[1052] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[1053] Importance rating and highlighting
[1054] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[1055] Real-time updates
[1056] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[1057] prompt question answer
[1058] Users can input questions about architecture via their devices. The server analyzes the questions using natural language processing (NLP) and generates appropriate answers from the analysis results. The generated answers are displayed on the user's device.
[1059] Component description generation
[1060] The server automatically generates a description for each component. It uses natural language processing technology to create the description based on the component's metadata (role, dependencies, use cases, etc.). The created description is then displayed on the device for the user to view.
[1061] Impact analysis of proposed changes
[1062] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's device.
[1063] Specific examples
[1064] For example, consider a user starting a new project and trying to understand the architecture of an existing system. The user accesses the tool via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram, highlighting important components. When the user asks a question about a specific component, the server instantly generates an answer and displays it on the terminal.
[1065] Furthermore, when a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, allowing the user to understand the impact of the proposal in advance and make more careful and efficient changes.
[1066] The above is an embodiment of the present invention. This system is a powerful tool that enables new participants and stakeholders to quickly and accurately understand a project and to carry out their work effectively.
[1067] The processing flow will be explained below.
[1068] Step 1:
[1069] Get the source code
[1070] Server: Obtains the latest source code from the project repository. Specifically, it uses the Git repository URL and clones the repository to a local environment using the git clone command or API. This retrieval process is performed periodically or triggered by a user request.
[1071] Step 2:
[1072] Source code analysis
[1073] Server: The cloned source code is passed to the analysis engine. Specifically, static analysis tools are used to analyze classes, methods, and dependencies. The analysis results are extracted as relationships and metadata for each component.
[1074] Step 3:
[1075] Saving to a database
[1076] Server: Stores the analysis results in an internal database, specifically a NoSQL database that stores component information and dependency data for future reference and analysis.
[1077] Step 4:
[1078] Generate architecture diagrams
[1079] Server: Generates an architecture diagram based on the saved analysis results. Specifically, it uses libraries such as D3.js and Graphviz to visually represent the analysis data. The generated diagram can be manipulated interactively by the user.
[1080] Step 5:
[1081] Dependency Analysis
[1082] Server: Further analyzes the dependencies between each component. Specifically, based on the analyzed dependency data, a dependency graph is created and the parent-child relationships between each node (component) are clarified.
[1083] Step 6:
[1084] Importance rating and highlighting
[1085] Server: Evaluates the importance of each component based on frequency of use and number of connections. Specifically, it analyzes log files and counts the frequency of calls to each component. Based on the results, it calculates an importance score and highlights important components on the architecture diagram by changing color and size.
[1086] Step 7:
[1087] Real-time update settings
[1088] Server: Set up a mechanism to detect source code changes in real time. Specifically, it uses Git webhooks to trigger analysis and diagram updates when changes are pushed to the repository.
[1089] Step 8:
[1090] Real-time updates
[1091] Server: When a change is detected, the source code is analyzed again, the architecture diagram is updated, and the results are sent to the client in real time.
[1092] Terminal: Receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[1093] Step 9:
[1094] prompt question answer
[1095] User: Enter architecture questions in a prompt format.
[1096] Server: Uses AI models to analyze the intent of the question and generate appropriate answers. Searches for relevant component information and dependencies to automatically generate answers.
[1097] Terminal: Displays the answer received from the server to the user.
[1098] Step 10:
[1099] Component description generation
[1100] Server: Based on the metadata of each component, it generates a description that is easy to understand even for beginners. Specifically, it uses NLP technology to automatically create the description.
[1101] Terminal: Display the generated description to the user.
[1102] Step 11:
[1103] Impact analysis of proposed changes
[1104] User: Submits system change proposals to the server.
[1105] Server: Analyzes the impact of the proposed change on other components. Specifically, it calculates the scope of impact based on the dependency graph and evaluates the components affected by the change and the difficulty of implementing it.
[1106] Terminal: Presents the calculated impact range and implementation difficulty to the user.
[1107] These are the specific processing steps in the program of this system. This system enables new participants and stakeholders to quickly and accurately understand the project and carry out their work efficiently.
[1108] Example 1
[1109] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1110] With conventional technology, it was difficult for newcomers to quickly understand the overall architecture of a project and proceed with their work effectively. In addition, there was an insufficient means to grasp in real time the impact that source code changes would have on the entire project, making it difficult to manage the risks associated with changes.
[1111] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1112] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between program elements, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user using natural language processing, means for highlighting important program elements on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes when a change is made, and means for calculating the frequency of use of each program element using log analysis. This enables newcomers to quickly grasp the overall picture of the project and to understand in real time the impact that changes to the source code will have on the entire project.
[1113] "Source code" is the text that describes a program and is converted into binary code that can be executed by a computer.
[1114] A "server" is a computer system that provides services over a network. In this case, it analyzes source code and generates architecture diagrams.
[1115] The "means of retrieval" refers to the mechanism for retrieving source code from a specified repository. This mainly includes the Git client.
[1116] "Means of analysis" refers to technologies for analyzing the contents of source code and extracting program elements and their dependencies. This includes static analysis engines.
[1117] A "program element" refers to an individual component in source code, and specifically includes classes, methods, variables, etc.
[1118] A "dependency" refers to a relationship of mutual dependence between program elements. For example, when one class calls another class, a dependency exists between them.
[1119] An "architecture diagram" is a visual representation of the structure of a software system and the relationships between its components.
[1120] "Means for real-time updates" refers to a mechanism for instantly detecting changes in source code and simultaneously updating the corresponding architecture diagrams. This mainly includes web hooks and WebSockets.
[1121] "Natural language processing" is a technique that allows computers to understand human language. Here, it is used to generate appropriate responses to user questions.
[1122] "Important program elements" refer to elements that have a particularly high impact or frequency of use within the entire system.
[1123] "Highlighting methods" are mechanisms used to visually highlight important program elements, including changes in color and size.
[1124] "Change Proposal" means a proposal to make new modifications or additions to an existing program.
[1125] "Scope of impact" refers to the extent to which a proposed change will affect the entire system.
[1126] "Implementation difficulty" indicates the technical difficulty and effort required to implement the proposed change.
[1127] "Log analysis" is a technique for analyzing a system's operation history and identifying specific patterns and frequency of use.
[1128] This invention is an AI-driven tool that helps newcomers quickly understand the project architecture and work effectively. The system consists of three entities: a server, a terminal, and a user.
[1129] System configuration
[1130] The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface for users, allowing them to operate the system and view information.
[1131] Hardware and software used
[1132] Server: A high-performance computer system (e.g., a cloud server)
[1133] Hardware: The server has a CPU, RAM, and SSD.
[1134] software:
[1135] Git client: Used to get the source code
[1136] Static analysis engines: SonarQube, ESLint, etc.
[1137] Graph generation: D3.js, Graphviz
[1138] Log analysis: Logstash, Kibana
[1139] Natural Language Processing Engines: GPT-3, BERT
[1140] WebSocket: Real-time update notifications
[1141] Webhooks: Git change monitoring
[1142] Program processing
[1143] Get the source code
[1144] The server clones the source code from the Git repository specified by the user, and the latest source code for the project is stored on the server.
[1145] Source Code Analysis
[1146] The source code is analyzed using a static analysis engine (e.g. SonarQube or ESLint) to extract dependencies between program elements, and this information is stored in an internal database.
[1147] Generate architecture diagrams
[1148] The server generates an architecture diagram based on the analysis results, for example, using D3.js or Graphviz to create a visual diagram, which is then displayed in the user's browser via the terminal.
[1149] Dependency Analysis
[1150] The server analyzes the dependencies between each program element and stores the results as a dependency graph, which can be visualized on the terminal and manipulated interactively by the user.
[1151] Importance rating and highlighting
[1152] The server uses log analysis tools (e.g., Logstash and Kibana) to calculate the frequency of use and number of connections for each program element and evaluate its importance. The evaluation results are highlighted by color and size and reflected in the architecture diagram.
[1153] Real-time updates
[1154] The server uses Git web hooks to detect changes in the source code in real time and immediately update the architecture diagram, while the terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[1155] Question and Answer Function
[1156] A user can enter a question about the architecture via the terminal, for example, "Can you tell me more about a specific class A?" The server uses a natural language processing engine (e.g., GPT-3 or BERT) to analyze the question and generate an appropriate answer, which is then displayed on the terminal.
[1157] Automatic generation of component descriptions
[1158] The server automatically generates descriptions for each program element based on the component's metadata (roles, dependencies, use cases, etc.) using natural language processing technology, and displays the descriptions on the terminal.
[1159] Impact analysis of proposed changes
[1160] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, if a user inputs "Please analyze the scope of impact if a new method C is added to class B," the server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal.
[1161] Specific examples
[1162] For example, if a user is starting a new project and wants to understand the architecture of an existing system, they access the tool via their terminal and begin the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important program elements. When the user asks a question about a specific program element, the server instantly generates an answer and displays it on the terminal. Furthermore, when the user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, and provides information based on that analysis to the terminal.
[1163] Prompt Sentence Examples
[1164] "Please describe the project architecture, highlighting the most important program elements."
[1165] "Give me more details about a specific class A, including any dependencies or use cases."
[1166] "Analyze the impact of specific proposed changes on other program elements."
[1167] In this way, the system provides a powerful tool for newcomers and current project members to quickly understand the overall system picture and make changes effectively.
[1168] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1169] Step 1:
[1170] The server retrieves the latest source code from the Git repository specified by the user. Specifically, the user enters the repository URL via the terminal, and based on the input information, the server clones the repository using a Git client and retrieves the source code. This retrieved source code is stored in the server's storage.
[1171] Step 2:
[1172] The server sends the acquired source code to a static analysis engine (e.g., SonarQube, ESLint) to perform the analysis. The analysis engine analyzes the source code and extracts program elements such as classes, methods, and variables, as well as their dependencies. The analysis results are stored in the server's internal database. The input is the source code, and the output is the analysis results (program elements and dependencies).
[1173] Step 3:
[1174] The server automatically generates an architecture diagram based on the analysis results. To do this, the server converts the dependency information into a graph structure and creates a visual architecture diagram using tools such as D3.js or Graphviz. This generated architecture diagram is displayed in the user's browser via the terminal. The input is the analysis results, and the output is the architecture diagram.
[1175] Step 4:
[1176] The server generates a dependency graph based on the dependency information and stores it in an internal database. This dependency graph consists of nodes and edges, and represents each program element and its dependencies. The terminal visualizes this dependency graph and allows the user to manipulate it interactively. The input is the analysis results, and the output is the dependency graph.
[1177] Step 5:
[1178] The server uses a log analysis tool (e.g., Logstash, Kibana) to calculate the frequency of use and number of interactions for each program element. To do this, the server analyzes the data in the log files and counts the number of times each program element is called. Based on this data, the server evaluates the importance and assigns it a score. The input is the log data, and the output is the importance score.
[1179] Step 6:
[1180] The server highlights important program elements on the architecture diagram based on their importance score. For example, it changes the color or size to visually indicate important parts to the user. This allows the user to grasp important program elements at a glance. The input is the importance score, and the output is the highlighted architecture diagram.
[1181] Step 7:
[1182] The server uses Git web hooks to detect changes to the source code in real time. When changes are pushed, the server re-analyzes and immediately updates the architecture diagram. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser. The input is the Git change notification, and the output is the updated architecture diagram.
[1183] Step 8:
[1184] A user inputs a question about the architecture via a terminal, for example, a prompt like "Tell me more about a specific class A." The server analyzes the question using a natural language processing engine (e.g., GPT-3, BERT) and generates an appropriate answer. This answer is displayed on the terminal. The input is the user's question, and the output is the answer.
[1185] Step 9:
[1186] The server automatically generates a description for each program element. Based on the component's metadata (roles, dependencies, use cases, etc.), the description is created using natural language processing technology and displayed on the terminal. For example, a description such as "Class A is a class that provides user authentication functionality and has the following methods" is generated. The input is metadata, and the output is the description.
[1187] Step 10:
[1188] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, the user might input, "Please analyze the scope of impact if a new method C is added to class B." The server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal. The input is the change proposal, and the output is the evaluation results of the scope of impact and the difficulty of implementation.
[1189] (Application example 1)
[1190] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1191] Rapidly introducing new machinery and equipment within factories and effectively performing maintenance and troubleshooting are important for improving work efficiency and ensuring safety. However, with traditional methods, it takes time for workers to understand the architecture and dependencies of new machinery, making it difficult to obtain the necessary information in real time. Furthermore, it is difficult to quickly identify critical components and grasp the impact of proposed changes, reducing work efficiency.
[1192] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1193] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user, means for highlighting important components on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes, and means for displaying visualized information on a smart device to support maintenance work of industrial equipment. This enables workers to quickly understand the architecture of new machines and facilities, obtain necessary information in real time, and significantly improve the efficiency of maintenance and troubleshooting.
[1194] "Source code" refers to program code written to implement the functionality of a computer program or system.
[1195] "Analysis" is the process of examining acquired source code and data in detail to clarify their structure, dependencies, etc.
[1196] "Component dependencies" are relationships that show how each part (component) of a software or system depends on other parts.
[1197] An "architecture diagram" is a visual representation of the overall structure of a system or program, showing the relationships and arrangement of components.
[1198] "Real-time updates" means that when a system or data is changed, the changes are reflected immediately and the latest information is provided.
[1199] "Responding to a question" refers to the process of providing an appropriate answer to a user's inquiry.
[1200] "Highlighting" refers to a display method that uses color, size, etc. to make specific information or components stand out.
[1201] The "scope of impact of proposed changes" refers to the scope that indicates how the changes proposed by the user will affect the entire system or program.
[1202] "Implementation difficulty" refers to the difficulty or complexity of actually incorporating the changes proposed by the user into a system or program.
[1203] "Visualized information" refers to data or analytical results presented in a visual format such as a chart or graph.
[1204] A "smart device" is an electronic device with advanced functionality that can connect to the Internet and run a variety of applications.
[1205] "Industrial equipment maintenance work" refers to the work of inspecting, repairing, and maintaining machinery and equipment used in fields such as manufacturing and heavy industry.
[1206] This invention is an AI-driven tool that enables newcomers to quickly understand project architecture and proceed with their work effectively. This invention will be described as being applied as an application for smart devices to support maintenance work on industrial equipment in factories.
[1207] System Configuration
[1208] The system consists of three components: a server, a terminal (smart device), and a user. The server retrieves and analyzes source code, generates architecture diagrams, analyzes dependencies, assesses importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and generates visualized information. The terminal includes a smart device (e.g., smart glasses) and provides an interface to the user, allowing the user to operate the system and view information.
[1209] Program processing
[1210] 1. Obtaining and analyzing the source code
[1211] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine (e.g., SonarQube) to extract information such as classes, methods, and dependencies. This information is then stored in an internal database (e.g., MySQL).
[1212] 2. Generating an architecture diagram
[1213] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js and Graphviz. This diagram is displayed on the user's smart glasses via the device.
[1214] 3. Dependency Analysis
[1215] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the smart glasses and manipulated interactively by the user.
[1216] 4. Importance rating and highlighting
[1217] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[1218] 5. Real-time updates
[1219] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The device receives update notifications via WebSocket and automatically updates the diagram on the smart glasses.
[1220] 6. Question-Answering System
[1221] Users can input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers from the analysis results. This process uses the Google Cloud Natural Language API and other tools. The generated answers are displayed on the user's smart glasses.
[1222] 7. Generating Visualized Information
[1223] Based on the metadata of the components (roles, dependencies, use cases, etc.), the server automatically generates a description using natural language processing technology, which is then displayed for the user to view through the smart glasses.
[1224] 8. Impact Analysis of Proposed Changes
[1225] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's smart glasses.
[1226] Specific examples
[1227] For example, consider a newly installed automated welding robot in a factory. When a worker puts on smart glasses and starts maintenance on the robot, the smart glasses display shows the following information:
[1228] 1. Machine architecture diagram: Visually confirm the internal structure of the automatic welding robot and the layout of its main components.
[1229] 2. Importance highlighting: Important parts are highlighted by color and size based on frequency of use and number of connections.
[1230] 3. Dependency analysis results: The dependencies between components are displayed as a graph, making it easier to identify faults and prioritize repairs.
[1231] 4. Real-time updates: Any changes or anomalies made during work are reflected immediately, and new information is updated in real time.
[1232] 5. Question-answering system: In response to a voice question such as "What role does this sensor play?", an answer such as "This is a sensor that monitors the welding temperature" is instantly displayed.
[1233] Example prompts to input to a generative AI model:
[1234] "Please tell me the role of the welding head sensor on the newly installed automatic welding robot."
[1235] The above is an embodiment of the present invention. This system is a powerful tool that allows newcomers and stakeholders to quickly and accurately understand projects and machines and carry out their work effectively.
[1236] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1237] Step 1: Get the source code
[1238] The server will clone the latest source code from the Git repository to get the source code of the project. This step takes the Git repository URL as input and gets the cloned source code as output. The cloned source code will be saved in a local directory on the server.
[1239] Step 2: Analyzing the source code
[1240] The server performs static analysis of the cloned source code using an analysis engine (e.g., SonarQube). This static analysis extracts information such as classes, methods, and dependencies. The input data is the source code obtained in step 1, and the output is metadata of the analysis results. This metadata is stored in an internal database (e.g., MySQL).
[1241] Step 3: Generate an architecture diagram
[1242] The server automatically generates an architecture diagram based on the analysis results. Here, D3.js and Graphviz are used to visually represent the graph structure. The input data is the dependency information extracted in step 2, and the generated architecture diagram is obtained as the output. This architecture diagram is sent to the smart glasses terminal.
[1243] Step 4: Save the dependency analysis results
[1244] The server analyzes the dependencies between components as a dependency graph and stores the results in a database. The input data is the analysis metadata, and the output is a dependency graph, which can be visualized on the device.
[1245] Step 5: Assess and highlight importance
[1246] The server analyzes logs and calculates the importance of each component based on its frequency of use and the number of connections. The input data is the log file and analysis metadata, and the output is an importance score. Important components are highlighted by color and size and reflected in the architecture diagram.
[1247] Step 6: Real-time updates
[1248] The server uses Git web hooks to detect changes in the source code in real time. The input data is notification of the changes, and the output is updated information on the architecture diagram. This updated information is sent via WebSocket to the smart glasses and is reflected visually.
[1249] Step 7: Operate the Q&A system
[1250] Users input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers. The input data is the voice question, and the output is an answer based on the analysis results. The answer is displayed on the smart glasses.
[1251] Step 8: Generate visualizations
[1252] The server automatically generates a description based on the metadata of the component using natural language processing technology. The input data is the metadata, and the generated description is obtained as output. This description can be viewed using smart glasses.
[1253] Step 9: Impact analysis of proposed changes
[1254] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the impact of the proposal on other components and calculates the difficulty of implementation. The input data is the proposed change, and the output is the scope of impact and the difficulty of implementation. This information is displayed on the smart glasses.
[1255] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1256] This invention is a system that combines an AI-driven tool that enables newcomers to quickly understand the project architecture and effectively proceed with their work with an emotion engine that recognizes the user's emotions. A specific embodiment of this system will be described below.
[1257] System Configuration
[1258] The system consists of four components: a server, a terminal (client), a user, and an emotion engine. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and recognizes user emotions. The terminal provides an interface with the user, allowing the user to operate the system and view information. The emotion engine analyzes the user's emotions and provides that information to the server.
[1259] Program processing
[1260] Source code acquisition and analysis
[1261] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is passed to the analysis engine, which performs static analysis and extracts information such as classes, methods, and dependencies. This information is stored in an internal database.
[1262] Generate architecture diagrams
[1263] Based on the analysis results, the server automatically generates an architecture diagram. A graph structure is created based on the extracted dependencies. A visual architecture diagram is generated using libraries such as D3.js and Graphviz, and this diagram is displayed in the user's browser via the terminal.
[1264] Dependency Analysis
[1265] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[1266] Importance rating and highlighting
[1267] The server evaluates the importance of each component based on frequency of use and number of connections. Log analysis is used to calculate the frequency of calls to each component, and an importance score is calculated based on the results. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[1268] Real-time updates
[1269] To detect changes in the source code in real time, the server uses Git webhooks. Every time a change is pushed to the repository, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[1270] prompt question answer
[1271] Users input architectural questions in a prompt format via their terminal, and the server uses an AI model to analyze the intent of the question and generate an appropriate answer, searching for relevant component information and dependencies, and providing the answer to the user.
[1272] Component description generation
[1273] The server generates a description based on the metadata of each component, making it easy for even beginners to understand. The description is automatically created using natural language processing (NLP) technology, and the created description is displayed on the user's device.
[1274] Impact analysis of proposed changes
[1275] When a user proposes a change, the server analyzes the scope of the change. It calculates the scope of the impact based on the dependency graph and evaluates the impact of the proposal on other components and the difficulty of implementation. The results are displayed on the user's device.
[1276] Combining Emotion Engines
[1277] emotion recognition
[1278] The emotion engine analyzes emotions from the user's facial expressions, tone of voice, input content, etc. The analyzed emotion information is sent to the server and used for various processes.
[1279] Changing visual emphasis
[1280] The server uses information from the emotion engine to change the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it can further highlight important components or add guide messages to help the user understand.
[1281] Question and answer adjustment
[1282] The server uses information from the emotion engine to adjust the content and method of question and answering. For example, if the user is frustrated, it can provide more polite and detailed explanations to reduce the user's stress. Also, if the emotion engine detects that the user is excited, it can present more proactive suggestions and next learning steps.
[1283] Specific examples
[1284] For example, consider a situation where a user is newly entering a system and trying to understand its existing architecture. The user accesses the system via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important components. In addition, if the emotion engine detects the user's confusion, the server further highlights important components and adds guide messages. When the user asks a question about a specific component, the server uses the information from the emotion engine to provide an appropriate and easy-to-understand answer.
[1285] When a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of its implementation. If the emotion engine detects a lack of confidence in the user, the server provides more detailed and supportive feedback, helping the user to proceed with the proposal with confidence.
[1286] The above is an embodiment of the present invention. This system not only helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, but also provides an advanced interface that takes the user's emotions into consideration.
[1287] The processing flow will be explained below.
[1288] Step 1:
[1289] Get the source code
[1290] Server: Use the git clone command to get the latest source code from the Git repository. Specify the repository URL and download the project source code to a local directory.
[1291] Step 2:
[1292] Source code analysis
[1293] Server: The cloned source code is passed to a static analysis engine, which analyzes the code structure and extracts classes, methods, variables, and dependencies using AST (Abstract Syntax Tree) analysis.
[1294] Step 3:
[1295] Saving to a database
[1296] Server: The analysis results are stored in an internal database. The database is in NoSQL format and stores metadata for each component (such as name, type, and dependencies) as a document.
[1297] Step 4:
[1298] Generate architecture diagrams
[1299] Server: Creates a graph structure based on the stored analysis data and generates an architecture diagram using D3.js or Graphviz. The diagram is sent to the client as JSON.
[1300] Step 5:
[1301] View the architecture diagram
[1302] Terminal: When a user accesses the system using a browser, the generated architecture diagram is displayed, allowing the user to interact with the diagram and view detailed information.
[1303] Step 6:
[1304] Dependency Analysis
[1305] Server: Analyze dependencies between components in detail. Create a dependency graph and explicitly define the relationships between each node and edge. This graph helps visualize the system and understand the dependencies.
[1306] Step 7:
[1307] Importance rating and highlighting
[1308] Server: Evaluate the importance of components based on frequency of use and number of interactions. Perform log analysis to tally the number of calls and interactions for each component. Highlight components on the architecture diagram using color and size according to their importance.
[1309] Step 8:
[1310] Real-time update settings
[1311] Server: Set up Git webhooks to automatically trigger analysis and diagram updates when changes are pushed to the repository, ensuring you always have the latest information.
[1312] Step 9:
[1313] Real-time updates
[1314] Terminal: Receives update notifications via WebSocket and updates the architecture diagram in real time, allowing users to always view the latest system information.
[1315] Step 10:
[1316] prompt question answer
[1317] User: Enters architecture questions into a form in a browser.
[1318] Server: Analyzes the question using a natural language processing engine and generates an appropriate answer. Searches for relevant analytical data and documents to generate the answer.
[1319] Step 11:
[1320] Show Answers
[1321] Terminal: Displays the generated answer to the user. The answer is displayed in the appropriate section of the interface to aid the user in understanding.
[1322] Step 12:
[1323] Emotion recognition
[1324] Terminal: Sends the user's facial expressions, tone of voice, input content, etc. to the emotion engine.
[1325] Emotion engine: Analyzes this data and determines the user's emotional state (e.g., confusion, irritation, confidence, etc.).
[1326] Step 13:
[1327] Sending emotional data
[1328] Emotion Engine: Sends the analyzed emotion data to the server, which combines this information with other processing to improve the user experience.
[1329] Step 14:
[1330] Changing visual emphasis
[1331] Server: Based on information from the emotion engine, it changes the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it further highlights important components and adds auxiliary guide messages.
[1332] Step 15:
[1333] Question and answer adjustment
[1334] Server: Uses information from the emotion engine to tailor the content and method of question-answering, providing detailed explanations for frustrated users and supportive feedback for those lacking confidence.
[1335] Step 16:
[1336] Component description generation
[1337] Server: Based on the metadata of each component, a description that is easy to understand even for beginners is generated. The description created using natural language processing technology is displayed to the user.
[1338] Step 17:
[1339] Impact analysis of proposed changes
[1340] User: Proposes changes to the system.
[1341] Server: Analyzes the impact of the proposal on other components and calculates the extent of the impact based on the dependency graph. It also evaluates the implementation difficulty and presents it to the user.
[1342] Step 18:
[1343] Presentation of results
[1344] Terminal: The calculated impact range and implementation difficulty are displayed to the user. Based on this, the user can consider whether to make changes and the details.
[1345] These are the specific processing steps of this system. This system helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, while also providing an advanced interface that responds to the user's emotions.
[1346] Example 2
[1347] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1348] It is not easy for newcomers to quickly and accurately understand the project architecture and work efficiently. It is also difficult to provide an interface that responds to the user's emotional state, and there are few ways to alleviate user confusion and frustration. Furthermore, if changes in the repository are not updated in real time, it becomes difficult to make decisions based on the latest information. It is also difficult to accurately predict the impact of proposed changes and evaluate the difficulty of implementation.
[1349] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for recognizing a user's emotion, means for changing the visual emphasis of the architecture diagram based on the recognized emotion, means for updating the generated architecture diagram in real time, means for responding to questions from the user, means for highlighting important components on the generated architecture diagram, and means for analyzing the scope of impact and implementation difficulty of proposed changes. This allows newcomers to quickly and accurately understand the project architecture, provides an interface that responds to the user's emotional state, reduces user confusion and frustration, and reflects changes in the repository in real time, enabling evaluation of the scope of impact and implementation difficulty of proposed changes.
[1350] "Source code" is textual information describing a program before it is converted into a format that can be executed by a computer.
[1351] "Analysis" refers to analyzing and decomposing source code and data to extract characteristics such as their structure, dependencies, and behavior.
[1352] A "component" is the smallest unit element that performs a function or role in a system, and includes classes, modules, etc.
[1353] A "dependency" is a relationship in which one component depends on another component, and indicates that a change in one component may affect the other.
[1354] An "architecture diagram" is a visual representation of the structure of a system and the dependencies between its components.
[1355] "Emotion recognition" is a technology that estimates a user's emotions from facial expressions, voice, text, etc.
[1356] "Visual enhancement" refers to changing the color, size, placement, etc. of information to make it easier to see and understand.
[1357] "Real-time updates" is the process by which changes in data or state are reflected immediately.
[1358] "Question answering" is the process of providing appropriate information in response to a user's inquiry.
[1359] A "change proposal" is a proposal for an improvement or modification to an existing system or project.
[1360] The "scope of impact" is the extent to which a particular change affects which part of the entire system.
[1361] "Implementation difficulty" indicates the effort and technical difficulty required to implement a specific change or feature addition.
[1362] A "repository" is a storage system for storing and managing source code and related data and documents.
[1363] "Log analysis" is the process of analyzing a system's operation history and event logs to extract specific information.
[1364] "Frequency" is an indicator that indicates the number of times a particular event or operation occurs within a certain period of time.
[1365] "Weighting" is the process of assigning points or weights to each element according to its importance during evaluation or analysis.
[1366] This invention is a system that combines an AI-driven tool to help newcomers quickly understand the project architecture and work effectively with an emotion engine that recognizes user emotions. How to implement this system will be explained in detail below.
[1367] System Configuration
[1368] The system consists of four components: a server, a terminal (client), a user, and an emotion engine. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and recognizes user emotions. The terminal provides an interface with the user, allowing the user to operate the system and view information. The emotion engine analyzes the user's emotions and provides that information to the server.
[1369] Source code acquisition and analysis
[1370] The server clones the latest source code from the Git repository. The cloned source code is passed to a static analysis engine to extract information such as classes, methods, and dependencies. This analysis can be performed using a tool such as SonarQube. The extracted information is then stored in a MySQL database.
[1371] Generate architecture diagrams
[1372] The server automatically generates an architecture diagram based on the analysis results, using libraries such as D3.js and Graphviz to generate a visual architecture diagram, which is then displayed in the user's browser via the terminal.
[1373] Dependency Analysis
[1374] The server analyzes the dependencies between each component and stores them as a dependency graph, which is visualized on the device and made interactive by the user using D3.js.
[1375] Importance rating and highlighting
[1376] The server uses log analysis to calculate the frequency of calls to each component and calculates a criticality score based on the results. Critical components are highlighted by color and size, and reflected in the visualized architecture diagram.
[1377] Real-time updates
[1378] To detect changes in the source code in real time, the server uses Git webhooks. Every time a change is pushed to the repository, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[1379] prompt question answer
[1380] The user inputs a question about the architecture in the form of a prompt via the terminal. The server uses a generative AI model (e.g., GPT-4) to analyze the intent of the question and generate an appropriate answer. Here is an example of a prompt:
[1381] "What is the role of this class?"
[1382] "What is the scope of the proposed changes?"
[1383] Component description generation
[1384] The server uses the metadata of each component to generate a description that is easy for beginners to understand. It uses natural language processing (NLP) techniques to create the description, which is then displayed on the user's device. For example, if a user asks about the role of a particular class, the server uses the metadata to generate the following description:
[1385] This class is responsible for user management functions, adding, updating, and deleting user information.
[1386] Impact analysis of proposed changes
[1387] When a user proposes a change, the server analyzes the scope of the change. It calculates the scope of the impact based on the dependency graph and evaluates the impact of the proposal on other components and the difficulty of implementation. The results are displayed on the user's device.
[1388] Combining Emotion Engines
[1389] The emotion engine analyzes emotions from the user's facial expressions, voice tone, input content, etc. The analyzed emotion information is sent to the server and used for various processes. For example, if the user is confused, the server will further highlight important components and add guide messages. If the user is frustrated, it will provide more polite and detailed explanations.
[1390] In this way, it is possible to implement a system that not only helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, but also provides an advanced interface that takes user emotions into consideration.
[1391] The flow of the identification process in the second embodiment will be described with reference to FIG.
[1392] Program processing flow
[1393] Step 1: Get the source code
[1394] Specific behavior:
[1395] A user accesses the system and requests to obtain the source code.
[1396] Input: Git repository URL
[1397] Output: Retrieved source code
[1398] explanation:
[1399] The server receives the Git repository URL provided by the user and then executes the "git clone https: / / example-repo-url" command to clone the latest source code locally, which will be used for subsequent analysis.
[1400] Step 2: Static Analysis
[1401] Specific behavior:
[1402] The server passes the cloned source code to a static analysis engine.
[1403] Input: Retrieved source code
[1404] Output: Parsed information (classes, methods, dependencies)
[1405] explanation:
[1406] The server uses static analysis tools such as SonarQube to extract information such as classes, methods, and dependencies from the source code, and the results of this analysis are stored in a database.
[1407] Step 3: Saving to the database
[1408] Specific behavior:
[1409] The server stores the analysis results in an internal database.
[1410] Input: Parsed information
[1411] Output: Store in database
[1412] explanation:
[1413] The analyzed information is stored in a MySQL database by executing the SQL query "INSERT INTO analysis_results (class, method, dependency) VALUES (...)".
[1414] Step 4: Generate an architecture diagram
[1415] Specific behavior:
[1416] The server generates architecture diagrams using D3.js and Graphviz.
[1417] Input: Analysis results in the database
[1418] Output: Architecture diagram
[1419] explanation:
[1420] The server uses the information stored in the database to structure the dependencies between components as a graph, then uses D3.js or Graphviz to generate a visual architecture diagram and send it to the user's browser.
[1421] Step 5: Emotion Recognition
[1422] Specific behavior:
[1423] The terminal transmits the user's facial expressions and voice to the emotion engine.
[1424] Input: User's facial expressions, voice, and input
[1425] Output: Emotional information
[1426] explanation:
[1427] The device uses a camera and microphone to capture the user's facial expressions and voice, and sends them to the emotion engine. The emotion engine analyzes this data and identifies the user's current emotion (e.g., confusion, irritation). The emotion information is then sent to the server.
[1428] Step 6: Adjusting visual highlighting
[1429] Specific behavior:
[1430] The server adjusts the visual emphasis of the architecture diagram based on the affective information.
[1431] Input: Emotion information, Architecture diagram
[1432] Output: Reconciled architecture diagram
[1433] explanation:
[1434] The server adjusts the visual emphasis of the architecture diagram based on the emotional information received from the emotion engine. For example, if the user is confused, it further highlights important components and adds guide messages to help the user understand.
[1435] Step 7: Real-time updates
[1436] Specific behavior:
[1437] The server uses Git webhooks to detect changes in the repository.
[1438] Input: Repository change notifications
[1439] Output: Updated architecture diagram
[1440] explanation:
[1441] The server sets up web hooks in the Git repository, and when it receives change notifications, it re-analyzes the source code, generates a new architecture diagram including the dependency changes, and sends it to the terminal via WebSocket, updating the diagram in the browser in real time.
[1442] Step 8: Prompt Question Response
[1443] Specific behavior:
[1444] A user inputs a question to the system via a terminal.
[1445] Input: prompt statement
[1446] Output: Answer to the question
[1447] explanation:
[1448] The user inputs a prompt sentence via the terminal, such as a question like, "What is the role of this class?" The server uses a generative AI model (e.g., GPT-4) to analyze the intent of the question, generate an appropriate answer, and provide it to the user.
[1449] Step 9: Generate component descriptions
[1450] Specific behavior:
[1451] The server generates component descriptions using NLP techniques.
[1452] Input: Component metadata
[1453] Output:Description
[1454] explanation:
[1455] The server generates a description based on the metadata of each component that is easy to understand even for beginners. The description is automatically generated using natural language processing (NLP) technology and displayed on the user's device. For example, if a user asks about a specific class, the description displayed is, "This class is responsible for user management functions, and adds, updates, and deletes user information."
[1456] Step 10: Impact analysis of proposed changes
[1457] Specific behavior:
[1458] The user makes change suggestions via the terminal.
[1459] Input: Proposed changes
[1460] Output: Assessment of impact scope and implementation difficulty
[1461] explanation:
[1462] When a user inputs a proposed change, the server analyzes the scope of impact based on the dependency graph. For example, if a proposal is made to "change this method," the server identifies the affected components from the dependency graph and evaluates the difficulty of implementation. The results are displayed on the user's device, providing information such as "This change may affect five modules."
[1463] The above are the specific processing steps and specific operations of the system program.
[1464] (Application example 2)
[1465] Next, a description will be given of Application Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the headset type terminal 314 will be referred to as a "terminal."
[1466] The challenge is that it is difficult for newcomers to quickly understand the architecture of the equipment and systems within the factory and carry out their work effectively. Another problem is the lack of means to reduce stress and confusion for workers and provide efficient support.
[1467] The specific processing by the specific processing unit 290 of the data processing device 12 in Application Example 2 is realized by the following means. In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from users, means for highlighting important components on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty when proposing changes, and means for analyzing user emotions using an emotion engine and adjusting system behavior using the analyzed emotion information. This enables newcomers and workers to quickly and effectively understand the architecture of equipment and systems in a factory, and the emotion engine can reduce stress and confusion.
[1468] "Source code" is the programming language text written by a developer to design and implement a software program.
[1469] A "component" is an independently functioning unit or part within a system or architecture.
[1470] A "dependency" refers to a relationship in which one component depends on the functionality or data of another component.
[1471] An "architecture diagram" is a visual representation of the components of a system or application and their interrelationships.
[1472] "Real-time" refers to a state in which processing and information updates are carried out immediately without delay.
[1473] An "emotion engine" is a technology that analyzes the user's emotions and adjusts the system's behavior based on that information.
[1474] "Question answering" is a function that automatically provides appropriate answers to questions from users.
[1475] "Importance" refers to the relative importance or influence of a component within a system.
[1476] A "change proposal" is a proposed modification or improvement to the current system or architecture.
[1477] "Scope of impact" refers to the extent to which a proposed change will affect the entire system.
[1478] "Implementation difficulty" refers to the difficulty or effort required to introduce the proposed change into the system.
[1479] A "dependency graph" is a graph that visually represents the dependencies between components.
[1480] This invention is a system for quickly understanding the architecture of equipment and systems in a factory and efficiently carrying out business operations. This system acquires and analyzes source code, extracts dependencies, generates architecture diagrams, updates them in real time, answers questions, evaluates importance, analyzes the scope of impact of proposed changes, and analyzes and adjusts user emotions using an emotion engine.
[1481] System Configuration
[1482] The system consists of four main components: a server, a terminal (client), a user, and an emotion engine.
[1483] Server: The server retrieves and analyzes source code, generates architecture diagrams, analyzes dependencies, assesses importance, provides real-time updates, answers questions, analyzes the scope of impact of proposed changes, and recognizes user emotions.
[1484] Terminal: A terminal is a device that provides an interface with a user and allows the user to operate the system or view information. For example, a tablet used by a factory worker.
[1485] Emotion Engine: The emotion engine analyzes the user's voice tone and facial expression data in real time and provides that information to the server.
[1486] Users: The users are the factory workers and engineers who use this system.
[1487] Program processing and technologies used
[1488] The server processes and calculates various data using the following technologies:
[1489] Hardware used
[1490] Tablets used by factory workers
[1491] Factory surveillance cameras (for emotion recognition)
[1492] Server (backend for source code contracts, theory analysis, sentiment analysis)
[1493] Software used
[1494] Git (GitPython): Get and clone source code.
[1495] D3.js / Graphviz: Generating architecture diagrams.
[1496] NLPEngine (Python NLP library): Natural language processing for question answering.
[1497] EmotionEngine (Python emotion recognition library): Analyzes worker emotions.
[1498] WebSocketServer (Python WebSocket library): Real-time update notifications.
[1499] The server first clones the source code from the specified repository and performs static analysis. This static analysis extracts information such as classes, methods, and dependencies, and stores it in an internal database. Next, an architecture diagram is automatically generated based on the analysis results. D3.js and Graphviz are used to generate a visually appealing and easy-to-use diagram. The architecture diagram is then displayed in the user's browser via the terminal.
[1500] The server also uses Git webhooks to detect source code changes in real time. Each time a change is pushed, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[1501] Users can enter architectural questions in a prompt format via the terminal, and the server uses an NLP engine to analyze the intent of the question and generate appropriate answers, searching for relevant component information and dependencies to provide the answer to the user.
[1502] The emotion engine analyzes the user's voice tone and facial expression data in real time and provides the emotion to the server. For example, if the user is confused, the server will further emphasize important components and add guide messages. When the user asks a question, it will provide appropriate and easy-to-understand answers according to the user's emotion.
[1503] Example: Prompt sentence example
[1504] For example, you can input the AI model using the following prompt sentence:
[1505] "I'd like to see a new wiring diagram. Could you please tell me in detail which wires are connected to which parts?"
[1506] The system enables newcomers and workers to quickly and effectively understand the architecture of equipment and systems within a factory, while its emotion engine helps reduce stress and confusion.
[1507] The flow of the specific processing in the application example 2 will be described with reference to FIG.
[1508] Step 1:
[1509] The server clones the latest source code from a specified repository. The input is the repository URL and authentication information. The output is a local copy of the cloned source code, which is then passed to the analysis engine. Specifically, it uses the GitPython library to retrieve the source code from the Git repository.
[1510] Step 2:
[1511] The server statically analyzes the cloned source code. The input is the cloned source code, and the output is information such as extracted classes, methods, and dependencies. Specifically, the static analysis engine analyzes the source code and stores the necessary metadata in an internal database.
[1512] Step 3:
[1513] The server generates an architecture diagram based on the analysis results. The input is the output of static analysis, and the output is a visualized architecture diagram. Specifically, it uses D3.js and Graphviz to create a graph structure and convert it into a diagram that can be displayed visually.
[1514] Step 4:
[1515] The server updates the generated architecture diagram in real time. The input is change notifications from the repository, and the output is the updated architecture diagram. Specifically, it uses Git web hooks to detect changes in the repository and sends update notifications to the terminal via WebSocket.
[1516] Step 5:
[1517] A user accesses the system via a terminal and views the architecture diagram. The input is the user's viewing request, and the output is the architecture diagram displayed in the browser. Specifically, the terminal receives update notifications from the server via WebSocket and automatically updates the architecture diagram on the browser.
[1518] Step 6:
[1519] The user inputs a question about the architecture in the form of a prompt via the terminal. The input is the user's question text, and the output is the answer text from the server. Specifically, the user's question is passed to an NLP engine, which analyzes it and generates an appropriate answer.
[1520] Step 7:
[1521] The server highlights important components. The input is the frequency of component use and the number of connections, and the output is a visually highlighted architecture diagram. Specifically, it uses log analysis to calculate the frequency of component calls, and calculates an importance score based on the result, which is reflected in the visualized diagram.
[1522] Step 8:
[1523] When a user proposes a change, the server analyzes its impact. The input is the user's proposed change text, and the output is an evaluation of the impact and implementation difficulty. Specifically, the server calculates the impact based on the dependency graph and evaluates the impact of the proposal on other components and the implementation difficulty.
[1524] Step 9:
[1525] The emotion engine analyzes the user's emotions. The input is the user's voice tone and facial expression data, and the output is analyzed emotional information. Specifically, it uses voice and image analysis technology to recognize the user's emotions in real time and provides that information to the server.
[1526] Step 10:
[1527] The server adjusts the system's behavior based on information from the emotion engine. The input is emotion information from the emotion engine, and the output is appropriate feedback and guidance messages for the user. Specifically, if the user is confused, the server further highlights important components and adds guidance messages.
[1528] The specific processing unit 290 transmits the result of the specific processing to the headset type terminal 314. In the headset type terminal 314, the control unit 46A causes the speaker 240 and the display 343 to output the result of the specific processing. The microphone 238 acquires audio indicating a user input regarding the result of the specific processing. The control unit 46A transmits audio data indicating the user input acquired by the microphone 238 to the data processing device 12. In the data processing device 12, the specific processing unit 290 acquires the audio data.
[1529] The data generation model 58 is a so-called generative AI (Artificial Intelligence). An example of the data generation model 58 is ChatGPT (Internet Search<URL: https: / / openai.com / blog / chatgpt> ), Gemini (Internet search <url: https: gemini.google.com ?hl="ja">) and other generation AIs. The data generation model 58 is obtained by performing deep learning on a neural network. A prompt including an instruction is input to the data generation model 58, and inference data such as voice data indicating voice, text data indicating text, and image data indicating an image is also input. The data generation model 58 performs inference on the input inference data in accordance with the instruction indicated by the prompt, and outputs the inference result in a data format such as voice data and text data. Here, inference refers to, for example, analysis, classification, prediction, and / or summarization.
[1530] In the above embodiment, an example was given in which the specific processing is performed by the data processing device 12, but the technology of the present disclosure is not limited to this, and the specific processing may be performed by the headset type terminal 314.
[1531] [Fourth embodiment]
[1532] FIG. 7 shows an example of the configuration of a data processing system 410 according to the fourth embodiment.
[1533] 7, a data processing system 410 includes a data processing device 12 and a robot 414. An example of the data processing device 12 is a server.
[1534] The data processing device 12 includes a computer 22, a database 24, and a communication I / F 26. The computer 22 is an example of a "computer" according to the technology of the present disclosure. The computer 22 includes a processor 28, a RAM 30, and a storage 32. The processor 28, the RAM 30, and the storage 32 are connected to a bus 34. The database 24 and the communication I / F 26 are also connected to the bus 34. The communication I / F 26 is connected to a network 54. Examples of the network 54 include a WAN (Wide Area Network) and / or a LAN (Local Area Network).
[1535] The robot 414 includes a computer 36, a microphone 238, a speaker 240, a camera 42, a communication I / F 44, and a control target 443. The computer 36 includes a processor 46, a RAM 48, and a storage 50. The processor 46, the RAM 48, and the storage 50 are connected to a bus 52. The microphone 238, the speaker 240, the camera 42, and the control target 443 are also connected to the bus 52.
[1536] The microphone 238 receives instructions and the like from the user 20 by receiving voice uttered by the user 20. The microphone 238 captures the voice uttered by the user 20, converts the captured voice into audio data, and outputs it to the processor 46. The speaker 240 outputs audio in accordance with instructions from the processor 46.
[1537] Camera 42 is a small digital camera equipped with an optical system including a lens, aperture, and shutter, and an imaging element such as a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor or a CCD (Charge Coupled Device) image sensor, and captures images of the surroundings of user 20 (for example, an imaging range defined by an angle of view equivalent to the field of vision of a typical healthy person).
[1538] The communication I / F 44 is connected to a network 54. The communication I / Fs 44 and 26 are responsible for the exchange of various information between the processor 46 and the processor 28 via the network 54. The exchange of various information between the processor 46 and the processor 28 using the communication I / Fs 44 and 26 is carried out in a secure state.
[1539] The control object 443 includes a display device, LEDs in the eyes, and motors for driving the arms, hands, and feet. The posture and gestures of the robot 414 are controlled by controlling the motors of the arms, hands, and feet. Some of the emotions of the robot 414 can be expressed by controlling these motors. In addition, the facial expressions of the robot 414 can also be expressed by controlling the light emission state of the LEDs in the eyes of the robot 414.
[1540] Fig. 8 shows an example of the main functions of the data processing device 12 and the robot 414. As shown in Fig. 8, in the data processing device 12, a specific process is performed by the processor 28. A specific process program 56 is stored in the storage 32.
[1541] The specific processing program 56 is an example of a "program" according to the technology of the present disclosure. The processor 28 reads the specific processing program 56 from the storage 32 and executes the read specific processing program 56 on the RAM 30. The specific processing is realized by the processor 28 operating as a specific processing unit 290 in accordance with the specific processing program 56 executed on the RAM 30.
[1542] The storage 32 stores a data generation model 58 and an emotion identification model 59. The data generation model 58 and the emotion identification model 59 are used by the identification processing unit 290.
[1543] In the robot 414, the processor 46 performs the reception output process. A reception output program 60 is stored in the storage 50. The processor 46 reads the reception output program 60 from the storage 50 and executes the read reception output program 60 on the RAM 48. The reception output process is realized by the processor 46 operating as the control unit 46A in accordance with the reception output program 60 executed on the RAM 48.
[1544] Next, a description will be given of the specific processing performed by the specific processing unit 290 of the data processing device 12. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1545] This invention is an AI-driven tool that enables newcomers to quickly understand the architecture of a project and proceed with their work effectively. A specific embodiment of this system will be described below.
[1546] System Configuration
[1547] The system consists of three components: a server, a terminal (client), and a user. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface to the user, allowing the user to operate the system and view information.
[1548] Program processing
[1549] Source code acquisition and analysis
[1550] To obtain the source code of a project, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine to extract information such as classes, methods, and dependencies. This information is stored in an internal database.
[1551] Generate architecture diagrams
[1552] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js or Graphviz. This diagram is displayed in the user's browser via the terminal.
[1553] Dependency Analysis
[1554] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[1555] Importance rating and highlighting
[1556] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[1557] Real-time updates
[1558] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[1559] prompt question answer
[1560] Users can input questions about architecture via their devices. The server analyzes the questions using natural language processing (NLP) and generates appropriate answers from the analysis results. The generated answers are displayed on the user's device.
[1561] Component description generation
[1562] The server automatically generates a description for each component. It uses natural language processing technology to create the description based on the component's metadata (role, dependencies, use cases, etc.). The created description is then displayed on the device for the user to view.
[1563] Impact analysis of proposed changes
[1564] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's device.
[1565] Specific examples
[1566] For example, consider a user starting a new project and trying to understand the architecture of an existing system. The user accesses the tool via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram, highlighting important components. When the user asks a question about a specific component, the server instantly generates an answer and displays it on the terminal.
[1567] Furthermore, when a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, allowing the user to understand the impact of the proposal in advance and make more careful and efficient changes.
[1568] The above is an embodiment of the present invention. This system is a powerful tool that enables new participants and stakeholders to quickly and accurately understand a project and to carry out their work effectively.
[1569] The processing flow will be explained below.
[1570] Step 1:
[1571] Get the source code
[1572] Server: Obtains the latest source code from the project repository. Specifically, it uses the Git repository URL and clones the repository to a local environment using the git clone command or API. This retrieval process is performed periodically or triggered by a user request.
[1573] Step 2:
[1574] Source code analysis
[1575] Server: The cloned source code is passed to the analysis engine. Specifically, static analysis tools are used to analyze classes, methods, and dependencies. The analysis results are extracted as relationships and metadata for each component.
[1576] Step 3:
[1577] Saving to a database
[1578] Server: Stores the analysis results in an internal database, specifically a NoSQL database that stores component information and dependency data for future reference and analysis.
[1579] Step 4:
[1580] Generate architecture diagrams
[1581] Server: Generates an architecture diagram based on the saved analysis results. Specifically, it uses libraries such as D3.js and Graphviz to visually represent the analysis data. The generated diagram can be manipulated interactively by the user.
[1582] Step 5:
[1583] Dependency Analysis
[1584] Server: Further analyzes the dependencies between each component. Specifically, based on the analyzed dependency data, a dependency graph is created and the parent-child relationships between each node (component) are clarified.
[1585] Step 6:
[1586] Importance rating and highlighting
[1587] Server: Evaluates the importance of each component based on frequency of use and number of connections. Specifically, it analyzes log files and counts the frequency of calls to each component. Based on the results, it calculates an importance score and highlights important components on the architecture diagram by changing color and size.
[1588] Step 7:
[1589] Real-time update settings
[1590] Server: Set up a mechanism to detect source code changes in real time. Specifically, it uses Git webhooks to trigger analysis and diagram updates when changes are pushed to the repository.
[1591] Step 8:
[1592] Real-time updates
[1593] Server: When a change is detected, the source code is analyzed again, the architecture diagram is updated, and the results are sent to the client in real time.
[1594] Terminal: Receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[1595] Step 9:
[1596] prompt question answer
[1597] User: Enter architecture questions in a prompt format.
[1598] Server: Uses AI models to analyze the intent of the question and generate appropriate answers. Searches for relevant component information and dependencies to automatically generate answers.
[1599] Terminal: Displays the answer received from the server to the user.
[1600] Step 10:
[1601] Component description generation
[1602] Server: Based on the metadata of each component, it generates a description that is easy to understand even for beginners. Specifically, it uses NLP technology to automatically create the description.
[1603] Terminal: Display the generated description to the user.
[1604] Step 11:
[1605] Impact analysis of proposed changes
[1606] User: Submits system change proposals to the server.
[1607] Server: Analyzes the impact of the proposed change on other components. Specifically, it calculates the scope of impact based on the dependency graph and evaluates the components affected by the change and the difficulty of implementing it.
[1608] Terminal: Presents the calculated impact range and implementation difficulty to the user.
[1609] These are the specific processing steps in the program of this system. This system enables new participants and stakeholders to quickly and accurately understand the project and carry out their work efficiently.
[1610] Example 1
[1611] Next, a description will be given of Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1612] With conventional technology, it was difficult for newcomers to quickly understand the overall architecture of a project and proceed with their work effectively. In addition, there was an insufficient means to grasp in real time the impact that source code changes would have on the entire project, making it difficult to manage the risks associated with changes.
[1613] The specific processing by the specific processing unit 290 of the data processing device 12 in the first embodiment is realized by the following means.
[1614] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between program elements, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user using natural language processing, means for highlighting important program elements on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes when a change is made, and means for calculating the frequency of use of each program element using log analysis. This enables newcomers to quickly grasp the overall picture of the project and to understand in real time the impact that changes to the source code will have on the entire project.
[1615] "Source code" is the text that describes a program and is converted into binary code that can be executed by a computer.
[1616] A "server" is a computer system that provides services over a network. In this case, it analyzes source code and generates architecture diagrams.
[1617] The "means of retrieval" refers to the mechanism for retrieving source code from a specified repository. This mainly includes the Git client.
[1618] "Means of analysis" refers to technologies for analyzing the contents of source code and extracting program elements and their dependencies. This includes static analysis engines.
[1619] A "program element" refers to an individual component in source code, and specifically includes classes, methods, variables, etc.
[1620] A "dependency" refers to a relationship of mutual dependence between program elements. For example, when one class calls another class, a dependency exists between them.
[1621] An "architecture diagram" is a visual representation of the structure of a software system and the relationships between its components.
[1622] "Means for real-time updates" refers to a mechanism for instantly detecting changes in source code and simultaneously updating the corresponding architecture diagrams. This mainly includes web hooks and WebSockets.
[1623] "Natural language processing" is a technique that allows computers to understand human language. Here, it is used to generate appropriate responses to user questions.
[1624] "Important program elements" refer to elements that have a particularly high impact or frequency of use within the entire system.
[1625] "Highlighting methods" are mechanisms used to visually highlight important program elements, including changes in color and size.
[1626] "Change Proposal" means a proposal to make new modifications or additions to an existing program.
[1627] "Scope of impact" refers to the extent to which a proposed change will affect the entire system.
[1628] "Implementation difficulty" indicates the technical difficulty and effort required to implement the proposed change.
[1629] "Log analysis" is a technique for analyzing a system's operation history and identifying specific patterns and frequency of use.
[1630] This invention is an AI-driven tool that helps newcomers quickly understand the project architecture and work effectively. The system consists of three entities: a server, a terminal, and a user.
[1631] System configuration
[1632] The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, and analyzes the scope of impact of proposed changes. The terminal provides an interface for users, allowing them to operate the system and view information.
[1633] Hardware and software used
[1634] Server: A high-performance computer system (e.g., a cloud server)
[1635] Hardware: The server has a CPU, RAM, and SSD.
[1636] software:
[1637] Git client: Used to get the source code
[1638] Static analysis engines: SonarQube, ESLint, etc.
[1639] Graph generation: D3.js, Graphviz
[1640] Log analysis: Logstash, Kibana
[1641] Natural Language Processing Engines: GPT-3, BERT
[1642] WebSocket: Real-time update notifications
[1643] Webhooks: Git change monitoring
[1644] Program processing
[1645] Get the source code
[1646] The server clones the source code from the Git repository specified by the user, and the latest source code for the project is stored on the server.
[1647] Source Code Analysis
[1648] The source code is analyzed using a static analysis engine (e.g. SonarQube or ESLint) to extract dependencies between program elements, and this information is stored in an internal database.
[1649] Generate architecture diagrams
[1650] The server generates an architecture diagram based on the analysis results, for example, using D3.js or Graphviz to create a visual diagram, which is then displayed in the user's browser via the terminal.
[1651] Dependency Analysis
[1652] The server analyzes the dependencies between each program element and stores the results as a dependency graph, which can be visualized on the terminal and manipulated interactively by the user.
[1653] Importance rating and highlighting
[1654] The server uses log analysis tools (e.g., Logstash and Kibana) to calculate the frequency of use and number of connections for each program element and evaluate its importance. The evaluation results are highlighted by color and size and reflected in the architecture diagram.
[1655] Real-time updates
[1656] The server uses Git web hooks to detect changes in the source code in real time and immediately update the architecture diagram, while the terminal receives update notifications via WebSocket and automatically updates the diagram in the browser.
[1657] Question and Answer Function
[1658] A user can enter a question about the architecture via the terminal, for example, "Can you tell me more about a specific class A?" The server uses a natural language processing engine (e.g., GPT-3 or BERT) to analyze the question and generate an appropriate answer, which is then displayed on the terminal.
[1659] Automatic generation of component descriptions
[1660] The server automatically generates descriptions for each program element based on the component's metadata (roles, dependencies, use cases, etc.) using natural language processing technology, and displays the descriptions on the terminal.
[1661] Impact analysis of proposed changes
[1662] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, if a user inputs "Please analyze the scope of impact if a new method C is added to class B," the server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal.
[1663] Specific examples
[1664] For example, if a user is starting a new project and wants to understand the architecture of an existing system, they access the tool via their terminal and begin the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important program elements. When the user asks a question about a specific program element, the server instantly generates an answer and displays it on the terminal. Furthermore, when the user proposes a change to the system, the server analyzes the scope of the change and the difficulty of implementation, and provides information based on that analysis to the terminal.
[1665] Prompt Sentence Examples
[1666] "Please describe the project architecture, highlighting the most important program elements."
[1667] "Give me more details about a specific class A, including any dependencies or use cases."
[1668] "Analyze the impact of specific proposed changes on other program elements."
[1669] In this way, the system provides a powerful tool for newcomers and current project members to quickly understand the overall system picture and make changes effectively.
[1670] The flow of the identification process in the first embodiment will be described with reference to FIG.
[1671] Step 1:
[1672] The server retrieves the latest source code from the Git repository specified by the user. Specifically, the user enters the repository URL via the terminal, and based on the input information, the server clones the repository using a Git client and retrieves the source code. This retrieved source code is stored in the server's storage.
[1673] Step 2:
[1674] The server sends the acquired source code to a static analysis engine (e.g., SonarQube, ESLint) to perform the analysis. The analysis engine analyzes the source code and extracts program elements such as classes, methods, and variables, as well as their dependencies. The analysis results are stored in the server's internal database. The input is the source code, and the output is the analysis results (program elements and dependencies).
[1675] Step 3:
[1676] The server automatically generates an architecture diagram based on the analysis results. To do this, the server converts the dependency information into a graph structure and creates a visual architecture diagram using tools such as D3.js or Graphviz. This generated architecture diagram is displayed in the user's browser via the terminal. The input is the analysis results, and the output is the architecture diagram.
[1677] Step 4:
[1678] The server generates a dependency graph based on the dependency information and stores it in an internal database. This dependency graph consists of nodes and edges, and represents each program element and its dependencies. The terminal visualizes this dependency graph and allows the user to manipulate it interactively. The input is the analysis results, and the output is the dependency graph.
[1679] Step 5:
[1680] The server uses a log analysis tool (e.g., Logstash, Kibana) to calculate the frequency of use and number of interactions for each program element. To do this, the server analyzes the data in the log files and counts the number of times each program element is called. Based on this data, the server evaluates the importance and assigns it a score. The input is the log data, and the output is the importance score.
[1681] Step 6:
[1682] The server highlights important program elements on the architecture diagram based on their importance score. For example, it changes the color or size to visually indicate important parts to the user. This allows the user to grasp important program elements at a glance. The input is the importance score, and the output is the highlighted architecture diagram.
[1683] Step 7:
[1684] The server uses Git web hooks to detect changes to the source code in real time. When changes are pushed, the server re-analyzes and immediately updates the architecture diagram. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser. The input is the Git change notification, and the output is the updated architecture diagram.
[1685] Step 8:
[1686] A user inputs a question about the architecture via a terminal, for example, a prompt like "Tell me more about a specific class A." The server analyzes the question using a natural language processing engine (e.g., GPT-3, BERT) and generates an appropriate answer. This answer is displayed on the terminal. The input is the user's question, and the output is the answer.
[1687] Step 9:
[1688] The server automatically generates a description for each program element. Based on the component's metadata (roles, dependencies, use cases, etc.), the description is created using natural language processing technology and displayed on the terminal. For example, a description such as "Class A is a class that provides user authentication functionality and has the following methods" is generated. The input is metadata, and the output is the description.
[1689] Step 10:
[1690] When a user proposes a change, the server analyzes the scope of impact based on the dependency graph. For example, the user might input, "Please analyze the scope of impact if a new method C is added to class B." The server evaluates the extent to which the proposal will affect other program elements and calculates the difficulty of implementation. This information is displayed on the user's terminal. The input is the change proposal, and the output is the evaluation results of the scope of impact and the difficulty of implementation.
[1691] (Application example 1)
[1692] Next, a description will be given of Application Example 1. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1693] Rapidly introducing new machinery and equipment within factories and effectively performing maintenance and troubleshooting are important for improving work efficiency and ensuring safety. However, with traditional methods, it takes time for workers to understand the architecture and dependencies of new machinery, making it difficult to obtain the necessary information in real time. Furthermore, it is difficult to quickly identify critical components and grasp the impact of proposed changes, reducing work efficiency.
[1694] The specific processing by the specific processing unit 290 of the data processing device 12 in the application example 1 is realized by the following means.
[1695] In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for updating the generated architecture diagram in real time, means for responding to questions from a user, means for highlighting important components on the generated architecture diagram, means for analyzing the scope of impact and implementation difficulty of proposed changes, and means for displaying visualized information on a smart device to support maintenance work of industrial equipment. This enables workers to quickly understand the architecture of new machines and facilities, obtain necessary information in real time, and significantly improve the efficiency of maintenance and troubleshooting.
[1696] "Source code" refers to program code written to implement the functionality of a computer program or system.
[1697] "Analysis" is the process of examining acquired source code and data in detail to clarify their structure, dependencies, etc.
[1698] "Component dependencies" are relationships that show how each part (component) of a software or system depends on other parts.
[1699] An "architecture diagram" is a visual representation of the overall structure of a system or program, showing the relationships and arrangement of components.
[1700] "Real-time updates" means that when a system or data is changed, the changes are reflected immediately and the latest information is provided.
[1701] "Responding to a question" refers to the process of providing an appropriate answer to a user's inquiry.
[1702] "Highlighting" refers to a display method that uses color, size, etc. to make specific information or components stand out.
[1703] The "scope of impact of proposed changes" refers to the scope that indicates how the changes proposed by the user will affect the entire system or program.
[1704] "Implementation difficulty" refers to the difficulty or complexity of actually incorporating the changes proposed by the user into a system or program.
[1705] "Visualized information" refers to data or analytical results presented in a visual format such as a chart or graph.
[1706] A "smart device" is an electronic device with advanced functionality that can connect to the Internet and run a variety of applications.
[1707] "Industrial equipment maintenance work" refers to the work of inspecting, repairing, and maintaining machinery and equipment used in fields such as manufacturing and heavy industry.
[1708] This invention is an AI-driven tool that enables newcomers to quickly understand project architecture and proceed with their work effectively. This invention will be described as being applied as an application for smart devices to support maintenance work on industrial equipment in factories.
[1709] System Configuration
[1710] The system consists of three components: a server, a terminal (smart device), and a user. The server retrieves and analyzes source code, generates architecture diagrams, analyzes dependencies, assesses importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and generates visualized information. The terminal includes a smart device (e.g., smart glasses) and provides an interface to the user, allowing the user to operate the system and view information.
[1711] Program processing
[1712] 1. Obtaining and analyzing the source code
[1713] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is statically analyzed by an analysis engine (e.g., SonarQube) to extract information such as classes, methods, and dependencies. This information is then stored in an internal database (e.g., MySQL).
[1714] 2. Generating an architecture diagram
[1715] Based on the analysis results, the server automatically generates an architecture diagram. Based on the analyzed dependencies, a graph structure is created and a visual architecture diagram is generated using D3.js and Graphviz. This diagram is displayed on the user's smart glasses via the device.
[1716] 3. Dependency Analysis
[1717] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the smart glasses and manipulated interactively by the user.
[1718] 4. Importance rating and highlighting
[1719] The server evaluates the importance of each component based on frequency of use and number of interactions. Log analysis is used to calculate the number of calls to each component, and the result is used to calculate an importance score. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[1720] 5. Real-time updates
[1721] The server detects changes in the source code in real time and immediately updates the architecture diagram. It uses Git webhooks to trigger analysis and diagram updates every time a code change is pushed. The device receives update notifications via WebSocket and automatically updates the diagram on the smart glasses.
[1722] 6. Question-Answering System
[1723] Users can input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers from the analysis results. This process uses the Google Cloud Natural Language API and other tools. The generated answers are displayed on the user's smart glasses.
[1724] 7. Generating Visualized Information
[1725] Based on the metadata of the components (roles, dependencies, use cases, etc.), the server automatically generates a description using natural language processing technology, which is then displayed for the user to view through the smart glasses.
[1726] 8. Impact Analysis of Proposed Changes
[1727] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the extent to which the proposal will affect other components and calculates the difficulty of implementation. This impact scope and implementation difficulty are displayed on the user's smart glasses.
[1728] Specific examples
[1729] For example, consider a newly installed automated welding robot in a factory. When a worker puts on smart glasses and starts maintenance on the robot, the smart glasses display shows the following information:
[1730] 1. Machine architecture diagram: Visually confirm the internal structure of the automatic welding robot and the layout of its main components.
[1731] 2. Importance highlighting: Important parts are highlighted by color and size based on frequency of use and number of connections.
[1732] 3. Dependency analysis results: The dependencies between components are displayed as a graph, making it easier to identify faults and prioritize repairs.
[1733] 4. Real-time updates: Any changes or anomalies made during work are reflected immediately, and new information is updated in real time.
[1734] 5. Question-answering system: In response to a voice question such as "What role does this sensor play?", an answer such as "This is a sensor that monitors the welding temperature" is instantly displayed.
[1735] Example prompts to input to a generative AI model:
[1736] "Please tell me the role of the welding head sensor on the newly installed automatic welding robot."
[1737] The above is an embodiment of the present invention. This system is a powerful tool that allows newcomers and stakeholders to quickly and accurately understand projects and machines and carry out their work effectively.
[1738] The flow of the specific processing in the application example 1 will be described with reference to FIG.
[1739] Step 1: Get the source code
[1740] The server will clone the latest source code from the Git repository to get the source code of the project. This step takes the Git repository URL as input and gets the cloned source code as output. The cloned source code will be saved in a local directory on the server.
[1741] Step 2: Analyzing the source code
[1742] The server performs static analysis of the cloned source code using an analysis engine (e.g., SonarQube). This static analysis extracts information such as classes, methods, and dependencies. The input data is the source code obtained in step 1, and the output is metadata of the analysis results. This metadata is stored in an internal database (e.g., MySQL).
[1743] Step 3: Generate an architecture diagram
[1744] The server automatically generates an architecture diagram based on the analysis results. Here, D3.js and Graphviz are used to visually represent the graph structure. The input data is the dependency information extracted in step 2, and the generated architecture diagram is obtained as the output. This architecture diagram is sent to the smart glasses terminal.
[1745] Step 4: Save the dependency analysis results
[1746] The server analyzes the dependencies between components as a dependency graph and stores the results in a database. The input data is the analysis metadata, and the output is a dependency graph, which can be visualized on the device.
[1747] Step 5: Assess and highlight importance
[1748] The server analyzes logs and calculates the importance of each component based on its frequency of use and the number of connections. The input data is the log file and analysis metadata, and the output is an importance score. Important components are highlighted by color and size and reflected in the architecture diagram.
[1749] Step 6: Real-time updates
[1750] The server uses Git web hooks to detect changes in the source code in real time. The input data is notification of the changes, and the output is updated information on the architecture diagram. This updated information is sent via WebSocket to the smart glasses and is reflected visually.
[1751] Step 7: Operate the Q&A system
[1752] Users input questions about architecture via voice through the smart glasses. The server analyzes the questions using natural language processing (NLP) technology and generates appropriate answers. The input data is the voice question, and the output is an answer based on the analysis results. The answer is displayed on the smart glasses.
[1753] Step 8: Generate visualizations
[1754] The server automatically generates a description based on the metadata of the component using natural language processing technology. The input data is the metadata, and the generated description is obtained as output. This description can be viewed using smart glasses.
[1755] Step 9: Impact analysis of proposed changes
[1756] When a user proposes a change, the server analyzes the scope of the proposal's impact. Based on the dependency graph, it evaluates the impact of the proposal on other components and calculates the difficulty of implementation. The input data is the proposed change, and the output is the scope of impact and the difficulty of implementation. This information is displayed on the smart glasses.
[1757] Furthermore, an emotion engine that estimates the user's emotion may be further combined. That is, the identification processing unit 290 may estimate the user's emotion using the emotion identification model 59, and perform identification processing using the user's emotion.
[1758] This invention is a system that combines an AI-driven tool that enables newcomers to quickly understand the project architecture and effectively proceed with their work with an emotion engine that recognizes the user's emotions. A specific embodiment of this system will be described below.
[1759] System Configuration
[1760] The system consists of four components: a server, a terminal (client), a user, and an emotion engine. The server acquires and analyzes source code, generates architecture diagrams, analyzes dependencies, evaluates importance, performs real-time updates, answers questions, analyzes the impact of proposed changes, and recognizes user emotions. The terminal provides an interface with the user, allowing the user to operate the system and view information. The emotion engine analyzes the user's emotions and provides that information to the server.
[1761] Program processing
[1762] Source code acquisition and analysis
[1763] To obtain the project's source code, the server clones the latest source code from the Git repository. This cloned source code is passed to the analysis engine, which performs static analysis and extracts information such as classes, methods, and dependencies. This information is stored in an internal database.
[1764] Generate architecture diagrams
[1765] Based on the analysis results, the server automatically generates an architecture diagram. A graph structure is created based on the extracted dependencies. A visual architecture diagram is generated using libraries such as D3.js and Graphviz, and this diagram is displayed in the user's browser via the terminal.
[1766] Dependency Analysis
[1767] The server analyzes the dependencies between each component and saves the results as a dependency graph, which can be visualized on the device and manipulated interactively by the user.
[1768] Importance rating and highlighting
[1769] The server evaluates the importance of each component based on frequency of use and number of connections. Log analysis is used to calculate the frequency of calls to each component, and an importance score is calculated based on the results. Important components are highlighted by color and size, and reflected in the visualized architecture diagram.
[1770] Real-time updates
[1771] To detect changes in the source code in real time, the server uses Git webhooks. Every time a change is pushed to the repository, analysis and diagram updates are triggered. The terminal receives update notifications via WebSocket and automatically updates the architecture diagram in the browser.
[1772] prompt question answer
[1773] Users input architectural questions in a prompt format via their terminal, and the server uses an AI model to analyze the intent of the question and generate an appropriate answer, searching for relevant component information and dependencies, and providing the answer to the user.
[1774] Component description generation
[1775] The server generates a description based on the metadata of each component, making it easy for even beginners to understand. The description is automatically created using natural language processing (NLP) technology, and the created description is displayed on the user's device.
[1776] Impact analysis of proposed changes
[1777] When a user proposes a change, the server analyzes the scope of the change. It calculates the scope of the impact based on the dependency graph and evaluates the impact of the proposal on other components and the difficulty of implementation. The results are displayed on the user's device.
[1778] Combining Emotion Engines
[1779] emotion recognition
[1780] The emotion engine analyzes emotions from the user's facial expressions, tone of voice, input content, etc. The analyzed emotion information is sent to the server and used for various processes.
[1781] Changing visual emphasis
[1782] The server uses information from the emotion engine to change the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it can further highlight important components or add guide messages to help the user understand.
[1783] Question and answer adjustment
[1784] The server uses information from the emotion engine to adjust the content and method of question and answering. For example, if the user is frustrated, it can provide more polite and detailed explanations to reduce the user's stress. Also, if the emotion engine detects that the user is excited, it can present more proactive suggestions and next learning steps.
[1785] Specific examples
[1786] For example, consider a situation where a user is newly entering a system and trying to understand its existing architecture. The user accesses the system via a terminal and begins the process of retrieving and analyzing the project's source code. The server automatically generates an architecture diagram and highlights important components. In addition, if the emotion engine detects the user's confusion, the server further highlights important components and adds guide messages. When the user asks a question about a specific component, the server uses the information from the emotion engine to provide an appropriate and easy-to-understand answer.
[1787] When a user proposes a change to the system, the server analyzes the scope of the change and the difficulty of its implementation. If the emotion engine detects a lack of confidence in the user, the server provides more detailed and supportive feedback, helping the user to proceed with the proposal with confidence.
[1788] The above is an embodiment of the present invention. This system not only helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, but also provides an advanced interface that takes the user's emotions into consideration.
[1789] The processing flow will be explained below.
[1790] Step 1:
[1791] Get the source code
[1792] Server: Use the git clone command to get the latest source code from the Git repository. Specify the repository URL and download the project source code to a local directory.
[1793] Step 2:
[1794] Source code analysis
[1795] Server: The cloned source code is passed to a static analysis engine, which analyzes the code structure and extracts classes, methods, variables, and dependencies using AST (Abstract Syntax Tree) analysis.
[1796] Step 3:
[1797] Saving to a database
[1798] Server: The analysis results are stored in an internal database. The database is in NoSQL format and stores metadata for each component (such as name, type, and dependencies) as a document.
[1799] Step 4:
[1800] Generate architecture diagrams
[1801] Server: Creates a graph structure based on the stored analysis data and generates an architecture diagram using D3.js or Graphviz. The diagram is sent to the client as JSON.
[1802] Step 5:
[1803] View the architecture diagram
[1804] Terminal: When a user accesses the system using a browser, the generated architecture diagram is displayed, allowing the user to interact with the diagram and view detailed information.
[1805] Step 6:
[1806] Dependency Analysis
[1807] Server: Analyze dependencies between components in detail. Create a dependency graph and explicitly define the relationships between each node and edge. This graph helps visualize the system and understand the dependencies.
[1808] Step 7:
[1809] Importance rating and highlighting
[1810] Server: Evaluate the importance of components based on frequency of use and number of interactions. Perform log analysis to tally the number of calls and interactions for each component. Highlight components on the architecture diagram using color and size according to their importance.
[1811] Step 8:
[1812] Real-time update settings
[1813] Server: Set up Git webhooks to automatically trigger analysis and diagram updates when changes are pushed to the repository, ensuring you always have the latest information.
[1814] Step 9:
[1815] Real-time updates
[1816] Terminal: Receives update notifications via WebSocket and updates the architecture diagram in real time, allowing users to always view the latest system information.
[1817] Step 10:
[1818] prompt question answer
[1819] User: Enters architecture questions into a form in a browser.
[1820] Server: Analyzes the question using a natural language processing engine and generates an appropriate answer. Searches for relevant analytical data and documents to generate the answer.
[1821] Step 11:
[1822] Show Answers
[1823] Terminal: Displays the generated answer to the user. The answer is displayed in the appropriate section of the interface to aid the user in understanding.
[1824] Step 12:
[1825] Emotion recognition
[1826] Terminal: Sends the user's facial expressions, tone of voice, input content, etc. to the emotion engine.
[1827] Emotion engine: Analyzes this data and determines the user's emotional state (e.g., confusion, irritation, confidence, etc.).
[1828] Step 13:
[1829] Sending emotional data
[1830] Emotion Engine: Sends the analyzed emotion data to the server, which combines this information with other processing to improve the user experience.
[1831] Step 14:
[1832] Changing visual emphasis
[1833] Server: Based on information from the emotion engine, it changes the visual emphasis of the architecture diagram according to the user's emotions. For example, if the user is confused, it further highlights important components and adds auxiliary guide messages.
[1834] Step 15:
[1835] Question and answer adjustment
[1836] Server: Uses information from the emotion engine to tailor the content and method of question-answering, providing detailed explanations for frustrated users and supportive feedback for those lacking confidence.
[1837] Step 16:
[1838] Component description generation
[1839] Server: Based on the metadata of each component, a description that is easy to understand even for beginners is generated. The description created using natural language processing technology is displayed to the user.
[1840] Step 17:
[1841] Impact analysis of proposed changes
[1842] User: Proposes changes to the system.
[1843] Server: Analyzes the impact of the proposal on other components and calculates the extent of the impact based on the dependency graph. It also evaluates the implementation difficulty and presents it to the user.
[1844] Step 18:
[1845] Presentation of results
[1846] Terminal: The calculated impact range and implementation difficulty are displayed to the user. Based on this, the user can consider whether to make changes and the details.
[1847] These are the specific processing steps of this system. This system helps newcomers and stakeholders to quickly and accurately understand the project and carry out their work efficiently, while also providing an advanced interface that responds to the user's emotions.
[1848] Example 2
[1849] Next, a description will be given of Example 2. In the following description, the data processing device 12 will be referred to as a "server" and the robot 414 will be referred to as a "terminal."
[1850] It is not easy for newcomers to quickly and accurately understand the project architecture and work efficiently. It is also difficult to provide an interface that responds to the user's emotional state, and there are few ways to alleviate user confusion and frustration. Furthermore, if changes in the repository are not updated in real time, it becomes difficult to make decisions based on the latest information. It is also difficult to accurately predict the impact of proposed changes and evaluate the difficulty of implementation.
[1851] The identification process by the identification processing unit 290 of the data processing device 12 in the second embodiment is realized by the following means. In this invention, the server includes means for acquiring source code, means for analyzing the acquired source code and extracting dependencies between components, means for automatically generating an architecture diagram based on the extracted dependencies, means for recognizing a user's emotion, means for changing the visual emphasis of the architecture diagram based on the recognized emotion, means for updating the generated architecture diagram in real time, means for responding to questions from the user, means for highlighting important components on the generated architecture diagram, and means for analyzing the scope of impact and implementation difficulty of proposed changes. This allows newcomers to quickly and accurately understand the project architecture, provides an interface that responds to the user's emotional state, reduces user confusion and frustration, and reflects changes in the repository in real time, enabling evaluation of the scope of impact and implementation difficulty of proposed changes.
[1852] "Source code" is textual information describing a program before it is converted into a format that can be executed by a computer.
[1853] "Analysis" refers to analyzing and decomposing source code and data to extract characteristics such as their structure, dependencies, and behavior.
[1854] A "component" is the smallest unit element that performs a function or role in a system, and includes classes, modules, etc.
[1855] A "dependency" is a relationship in which one component depends on another component, and indicates that a change in one component may affect the other.
[1856] An "architecture diagram" is a visual representation of the structure of a system and the dependencies between its components.
[1857] "Emotion recognition" is a technology that estimates a user's emotions from facial expressions, voice, text, etc.
[1858] "Visual enhancement" refers to changing the color, size, placement, etc. of information to make it easier to see and understand.
[1859] "Real-time updates" is the process by which changes in data or state are reflected immediately.
[1860] "Question answering" is the process of providing appropriate information in response to a user's inquiry.
[1861] A "change proposal" is a proposal for an improvement or modification to an existing system or project.
[1862] The "scope of impact" is the extent to which a particular change affects which part of the entire system.
[1863] "Implementation difficulty" indicates the effort and technical difficulty required to implement a specific change or feature addition.
[1864] A "repository" is a storage system for storing and managing source co...
Claims
1. A means of obtaining the source code; A means for analyzing the obtained source code to extract dependencies between components; A means for automatically generating an architecture diagram based on the extracted dependencies; A means for updating the generated architecture diagram in real time; and means for responding to user inquiries; a means of highlighting important components on the generated architecture diagram; A means of analyzing the scope of impact and difficulty of implementation when proposing changes; A system including:
2. The system of claim 1 , further comprising means for supporting multiple repositories and analyzing the source code in each repository.
3. 2. The system according to claim 1, further comprising means for weighting the importance of components based on frequency of use and number of connections, and highlighting the weighted importance on the architecture diagram.
Citation Information
Patent Citations
Persona chatbot control method and system
JP2022180282A