Information processing method, information processing device, and computer program

JP2026139433APending Publication Date: 2026-09-01PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2025026134
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2026-09-01

AI Technical Summary

Benefits of technology

【0008】 本開示の技術によれば、自動生成されたコードに対する変更作業を支援できる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026139433000001_ABST
    Figure 2026139433000001_ABST
Patent Text Reader

Abstract

We provide technology to assist with modifying automatically generated code. [Solution] The difference management device 16 includes a storage unit that stores the identification information of each element of the structured data and the difference information associated with changes to each element of the structured data in association with each other. The difference management device 16 acquires the first structured data output from the conversion device 14, in which each element contains identification information. The difference management device 16 outputs second structured data to each element of the first structured data, reflecting the difference information associated with the identification information of each element.
Need to check novelty before this filing date? Find Prior Art

Description

[[Technical Field]]

[0001] The present disclosure relates to data processing technology, and particularly to an information processing method, an information processing apparatus, and a computer program. [[Background Art]]

[0002] In recent years, technology has been provided that uses a computer to display the layout of a display image based on input structured data (see, for example, Patent Document 1). [[Prior Art Literature]] [[Patent Literature]]

[0003] [[Patent Document 1]] Japanese Unexamined Patent Publication No. 2023-74436 [[Summary of the Invention]] [[Problem to be Solved by the Invention]]

[0004] Structured data defining a display image layout may be converted by a conversion device into other structured data as source code (also referred to as "output code" herein), and a developer may modify this output code manually or otherwise. In such a case, the same modification needs to be applied to the output code output from the conversion device the next time. An object of the present disclosure is to provide technology that supports modification work for automatically generated code. [[Means for Solving the Problem]]

[0005] In order to solve the above problem, in the information processing method according to one aspect of the present disclosure, an information processing apparatus including a storage unit that stores identification information of each element of structured data in association with difference information resulting from modification of each element of the structured data acquires first structured data in which each element includes identification information, and outputs second structured data that reflects, in each element of the first structured data, the difference information associated with the identification information of each element.

[0006] Another aspect of the present disclosure is an information processing device. This device includes a storage unit that stores identification information for each element of structured data and difference information associated with changes to each element of structured data in association with each element; an acquisition unit that acquires first structured data to which identification information has been assigned to each element; and a difference application unit that outputs second structured data to each element of the first structured data that reflects the difference information associated with the identification information of each element.

[0007] Furthermore, any combination of the above components, or any conversion of the expressions of this disclosure between systems, computer programs, recording media containing computer programs, etc., are also valid forms of this disclosure. [Effects of the Invention]

[0008] The technology described herein can assist in modifying automatically generated code. [Brief explanation of the drawing]

[0009] [Figure 1] This diagram shows the process of modifying automatically generated code. [Figure 2] This diagram shows the process of modifying automatically generated code. [Figure 3] The problem with conventional methods is shown in the figure. [Figure 4] The problem with conventional methods is shown in the figure. [Figure 5] The problem with conventional methods is shown in the figure. [Figure 6] This figure shows the difference management method of the first embodiment. [Figure 7] This is a diagram showing the configuration of the information processing system according to the first embodiment. [Figure 8] This is a block diagram showing the functional blocks included in the difference management device of the first embodiment. [Figure 9] This is a flowchart showing the operation of the difference management device of the first embodiment. [Figure 10] This figure shows an example where differences are not correctly merged in the difference management device of the first embodiment. [Figure 11] This is a flowchart showing the operation of the difference management device of the second embodiment. [Figure 12] This figure shows an example where differences are not correctly merged in the difference management device of the first embodiment. [Figure 13] This is a block diagram showing the functional blocks included in the difference management device of the fourth embodiment. [Figure 14] This is a flowchart showing the operation of the difference management device of the fourth embodiment. [Figure 15] This is a flowchart showing the operation of the difference management device of the fifth embodiment. [Figure 16] This is a flowchart showing the operation of the difference management device of the sixth embodiment. [Figure 17] Figure 16 shows a flowchart illustrating the operation of the differential management device. [Figure 18] This figure shows an example of the code output in the sixth embodiment. [Modes for carrying out the invention]

[0010] The main body of the apparatus or method in the present disclosure includes a computer. The functions of the main body of the apparatus or method in the present disclosure are implemented when the computer executes a program. The computer includes a processor that operates in accordance with a program as a main hardware configuration. The type of the processor is not limited as long as the processor can implement the functions by executing the program. The processor is composed of one or more electronic circuits including a semiconductor integrated circuit (IC) or a large scale integration (LSI). A plurality of electronic circuits may be integrated on a single chip, or may be provided on a plurality of chips. A plurality of chips may be integrated in a single apparatus, or may be included in a plurality of apparatuses. The program may be recorded on a non-transitory recording medium such as a computer-readable read only memory (ROM), an optical disc, or a hard disk drive, or may be recorded on a temporary storage medium such as a computer-readable random access memory (RAM). The program may be stored in the recording medium in advance, or may be supplied to the recording medium or storage medium via a wide area communication network including the Internet or the like.

[0011] The structured data of the embodiment is data shaped into a predetermined structure. For example, the structured data of the embodiment includes a document described in a predetermined data description language (e.g., a markup language such as HTML or XML, JSON (JavaScript (registered trademark) Object Notation), etc.). In addition, the structured data of the embodiment includes source code blocked by structured programming, for example, source code described in an object-oriented language (Dart, Java (registered trademark), Python (registered trademark), etc.). The technology of the embodiment can support modification work on various types of structured data.

[0012] Furthermore, the structured data of the embodiment includes one or more elements. An element can also be referred to as a block of code within the structured data. An element may be provided for each part placed on a screen (e.g., GUI components such as buttons and text fields). Furthermore, an element may be provided in units of classes, methods, functions, or structures in source code. The code described in an element is hereinafter also referred to as a "property".

[0013] <First Embodiment> First, problems of the related art and the solution to the problems according to the first embodiment will be described with reference to FIGS. 1 to 6.

[0014] FIG. 1 shows a flow of modifying automatically generated code. In the system of FIG. 1, a conversion apparatus automatically converts input data 1 into output code 1. Input data 1 (the same applies to input data 2 described later) is design data indicating a screen layout and the like created by a designer, and is structured data in JSON format. Output code 1 (the same applies to output code 2 described later) is structured data in Dart format, and is also source code.

[0015] A user such as a developer makes necessary modifications to output code 1 to create modified code 1, and advances system development using modified code 1. Modified code 1 (the same applies to modified code 2 and merged code described later) is also structured data in Dart format. Note that modifications to output code 1 or output code 2 are not limited to manual work by a developer, and may include modifications using AI or the like.

[0016] When a designer changes the screen layout, input data 1 is accordingly updated to input data 2. The conversion apparatus automatically converts input data 2 into output code 2. Output code 2 does not reflect the corrections added by the user to output code 1. Therefore, the user had to add the corrections added to output code 1 to output code 2 as well. As described above, conventionally, redundant work has sometimes occurred when changing automatically generated code.

[0017] Figure 2 also illustrates the process of modifying automatically generated code. Here, we will explain the automatic merging of differences using the conventional difference management method (hereinafter also referred to as the "conventional method"). When a user, such as a developer, makes the necessary modifications to output code 1 to create modified code 1, the conventional method saves the difference between output code 1 and modified code 1, associating it with the position information within output code 1. When output code 2 is generated, the conventional method creates merged code by reflecting the above difference at the position within output code 2 indicated by the above position information.

[0018] Figure 3 illustrates the problems with the conventional method. In the conventional method, the difference information is the difference between output code 1 and correction code 1, associated with positional information within output code 1 (e.g., line and indentation pairs). Note that in the difference information in Figure 3, the sign "+" is used to manage added lines, but the sign "-" could also be used to manage deleted lines.

[0019] In the example in Figure 3, the designer swapped the positions of the button and the text field on the screen, resulting in the button and text field elements being swapped in Output Code 2 compared to Output Code 1. Ideally, "some code2" should be added to the text field element and "some code1" to the button element in the merged code. However, the conventional method adds "some code1" to the text field element and "some code2" to the button element in the merged code. In other words, the conventional method applies the difference to the wrong positions due to a change in the order of elements within the structured data.

[0020] Figure 4 also illustrates the problems with the conventional method. In the example in Figure 4, when the designer added a new button above the original button on the screen, the new button element (the upper button element) is added to Output Code 2 from Output Code 1. In the merged code, "some code" should be added to the original lower button element, but with the conventional method, "some code" is added to the upper button element instead.

[0021] Figure 5 also illustrates the problems with the conventional method. In the example in Figure 5, the designer has enclosed an existing button on the screen in a container, and as a result, in output code 2, the original button element is enclosed in a container element. In this case, the position of the code added to output code 1 cannot be detected (for example, because the line number and indentation of "text:'Login'" immediately preceding the added code have changed), and therefore the conventional method fails to merge the differences.

[0022] Figure 6 shows the difference management method of the first embodiment. In the first embodiment, element-specific IDs are set for input data based on design data, and element-specific IDs are also set for output code based on input data. An ID is identification information or identifier that can uniquely identify an element of the output code. As shown in the difference information in Figure 6, in the first embodiment, the difference between output code 1 and modified code 1 is managed by associating it with the ID of each element of output code 1. The way the difference is stored is not limited to having only a pure difference such as "onTap: () { / / some code}" for "id = 123". For example, "Button(id: '123' text: 'Login' onTap: () { / / some code})" may be stored for "id = 123", that is, the entire element including the difference may be stored as the difference.

[0023] In the first embodiment, a merged code is created by reflecting the difference information associated with the ID of each element in output code 2. This allows "some code2" to be added to the text field element and "some code1" to the button element in the merged code. In other words, even if the position of elements changes between output code 1 and output code 2, the difference can be applied to the correct position in output code 2. Furthermore, according to the difference management method of the first embodiment, even in the cases of Figures 4 and 5, the difference can be applied to the correct position in output code 2 based on the ID of each element.

[0024] The details of the first embodiment will be described below. Figure 7 shows the configuration of the information processing system 10 in the first embodiment. The information processing system 10 comprises a designer terminal 11, a user terminal 12, an input data storage device 13, a conversion device 14, an output code storage device 15, and a difference management device 16. Each device of the information processing system 10 is connected via a communication network. The communication network may include a LAN, WAN, or the Internet.

[0025] The designer terminal 11 is an information terminal operated by a designer who designs the screen as the user interface of the information system. The user terminal 12 is an information terminal operated by a user, acting as a developer, who edits the output code output from the conversion device 14 described later. Both the designer terminal 11 and the user terminal 12 may be PCs, smartphones, or tablet devices. The information processing system 10 may have multiple designer terminals 11 and multiple user terminals 12.

[0026] The input data storage device 13 stores input data (JSON data in the first embodiment) output from an application (not shown) that assists in screen design. The conversion device 14 automatically generates output code (Dart code in the first embodiment) corresponding to the input data using known technology in response to a user request. The conversion device 14 outputs the generated output code to the output code storage device 15 and the difference management device 16.

[0027] The output code storage device 15 stores the output code generated by the conversion device 14 and the output code modified by the user (i.e., the modified code). In the first embodiment, the input data, output code, and modified code are all structured data in which each element includes an ID. The difference management device 16 is an information processing device that manages the difference between the output code and the modified code after the user has modified the output code. The function of the difference management device 16 may be realized by the cooperation of multiple information processing devices connected via a communication network as a system.

[0028] Figure 8 is a block diagram showing the functional blocks of the differential management device 16 of the first embodiment. The various functions shown in Figure 8 are realized by the computer mounted on the differential management device 16 executing a program. The computer includes, as hardware, a memory for loading the program, one or more processors (CPUs, etc.) for executing the loaded program, auxiliary storage devices, and other LSIs. The processor is composed of multiple electronic circuits, including semiconductor integrated circuits and LSIs, and these multiple electronic circuits may be mounted on a single chip or on multiple chips. The functional blocks shown in Figure 8 are realized through the cooperation of hardware and software, and therefore, it will be understood by those skilled in the art that these functional blocks can be realized in various ways using hardware alone, software alone, or a combination thereof.

[0029] The difference management device 16 comprises a processing unit 20, a storage unit 22, and a communication unit 24. The processing unit 20 performs information processing to manage the difference between the output code and the correction code. The storage unit 22 stores data that is referenced or updated by the processing unit 20. The communication unit 24 communicates with external devices according to a predetermined communication protocol. The processing unit 20 sends and receives data to and from the user terminal 12, the conversion device 14, and the output code storage device 15 via the communication unit 24.

[0030] The memory unit 22 includes a differential memory unit 26 and an output code temporary memory unit 28. The differential memory unit 26 stores the ID of each element of the output code and the difference information between the output code and the modified code (in other words, the difference information resulting from changes to each element of the output code) in association with each other. That is, the differential memory unit 26 stores the correspondence between the ID of each element of the output code and the difference information.

[0031] The output code temporary storage unit 28 temporarily stores the output code generated by the conversion device 14 as data for detecting the difference between the output code generated by the conversion device 14 and the corrected code.

[0032] The processing unit 20 includes an output code acquisition unit 40, a difference application unit 42, and a difference recognition unit 44. The functions of these multiple functional blocks may be implemented in a computer program. This computer program may be stored on a recording medium and installed on the storage of the difference management device 16 via that recording medium. Alternatively, this computer program may be downloaded via the processing unit 20 and installed on the storage of the difference management device 16. The processor mounted on the difference management device 16 may perform the functions of these multiple functional blocks by reading this computer program into main memory and executing it.

[0033] The output code acquisition unit 40 acquires the output code, which is output from the conversion device 14 as first structured data in which each element includes an ID. The difference application unit 42 generates a merged code as second structured data in which the difference information associated with the identification information of each element of the output code stored in the difference storage unit 26 is reflected in each element of the output code. The difference application unit 42 stores the generated merged code in the output code storage device 15 as source code to be edited by the user.

[0034] The difference recognition unit 44 compares the modified code after user modification, stored in the output code storage device 15, with the output code stored in the output code temporary storage unit 28 to detect the difference between the output code and the modified code. The difference recognition unit 44 stores information (hereinafter also called "ID-added difference information") that associates the ID of the element in which a difference was detected with the detected difference information in the difference storage unit 26. Hereinafter, each element (ID) in the ID-added difference information is referred to as a "hank," or in other words, each difference for each element is also called a "hank." For example, the difference information in Figure 6 includes the hunk for ID "123" and the hunk for ID "abc."

[0035] Figure 9 is a flowchart showing the operation of the differential management device 16 in the first embodiment. The operation of the information processing system 10 in the first embodiment will be described below with reference to Figure 9.

[0036] When a designer updates the screen layout, the input data corresponding to the updated screen layout is stored in the input data storage device 13. The user terminal 12 requests the output of an output code from the conversion device 14 in accordance with the user's operation to edit the output code. In response to the above request, the conversion device 14 automatically generates an output code corresponding to the input data stored in the input data storage device 13, saves the generated output code in the output code storage device 15, and also sends the generated output code to the difference management device 16.

[0037] The output code acquisition unit 40 of the differential management device 16 receives the output code transmitted from the conversion device 14. Upon receiving the output code (Y in S10), the output code acquisition unit 40 stores the received output code in the output code temporary storage unit 28 (S11).

[0038] The difference application unit 42 of the difference management device 16 identifies the elements of the output code (in this case, the output code stored in the output code storage device 15) to which the ID of the target hunk is set, for each hunk indicated by the ID-added difference information stored in the difference storage unit 26 (Y in S12). The difference application unit 42 merges the difference information of the target hunk into the elements of the identified output code. In other words, the difference application unit 42 updates the output code stored in the output code storage device 15 so that the difference information of the target hunk is reflected in the elements of the identified output code (S13).

[0039] If an error occurs during the Hunk merge process (merger failure) (N in S14), the difference application unit 42 displays the error on a predetermined display (S15). In the first embodiment, the difference application unit 42 transmits information about the error that occurred to the user terminal 12 and displays the error information on the display of the user terminal 12, allowing the user to confirm the error information. Then, the process proceeds to S16. If no error occurs during the Hunk merge process (merger success) (Y in S14), the process proceeds to S16. Note that in the difference management device 16 of this embodiment, the display of errors is not an essential component. For example, the process may proceed directly to S16 regardless of the success or failure of the merge process in S13.

[0040] If there are unmerged hunks remaining in the ID-added difference information of the difference storage unit 26 (Y in S16), the process returns to S13. If there are no unmerged hunks remaining, that is, if all hunks have either been successfully merged or failed to merge (N in S16), the difference application process is terminated, and the output code stored in the output code storage device 15 is made into a merged code that can be modified by the user (S17). If no ID-added difference information is stored in the difference storage unit 26 (N in S12), the processes in S13-S17 are skipped. If the output code output from the conversion device 14 is not accepted (N in S10), the processes in S11-S17 are skipped.

[0041] The user modifies the output code stored in the output code storage device 15. The user terminal 12 saves the modified output code to the output code storage device 15 in response to the user's operation. The difference recognition unit 44 of the difference management device 16 detects that the modified output code has been saved in the output code storage device 15 (Y in S18). The difference recognition unit 44 recognizes the difference between the modified output code stored in the output code storage device 15 and the original output code stored in the output code temporary storage unit 28, element by element of the output code. The difference recognition unit 44 stores ID-added difference information, which associates the ID of each element with the difference information, in the difference storage unit 26 (S19). For example, in the second and subsequent conversions, the output code 2 in Figure 2 is merged to reflect the previous difference, and the user (developer) makes additional changes to this merged code. The difference recognized in S19 is the sum of the previous difference and the additional changes made this time; in other words, it is the difference between output code 2 and the final code after user modification.

[0042] If it is not detected that the modified output code has been saved in the output code storage device 15 (N in S18), the process in S19 is skipped. The difference management device 16 repeatedly executes the process shown in Figure 11.

[0043] In the first embodiment, the difference management device 16 automatically provides the user with an output code (merged code) that reflects the changes made by the user to the previously outputted output code when the conversion device 14 outputs an output code. This eliminates the need for the user to make the same changes again, reducing the user's burden. It also helps to prevent omissions in changes to the output code.

[0044] <Second Embodiment> The second embodiment of this disclosure will be described focusing on the differences from the first embodiment. Components of the second embodiment that are the same as or equivalent to those of the first embodiment will be denoted by the same reference numerals as those of the first embodiment, and explanations that overlap with the description of the first embodiment will be omitted as appropriate.

[0045] Figure 10 shows an example where differences are not correctly merged in the difference management device 16 of the first embodiment. Here, due to some factor, the ID of the same element (a button in Figure 10) has changed between output code 1 and output code 2 (and similarly between input data 1 and input data 2). For example, this could happen if a designer deletes the original button when setting the screen layout and then places the same button again. In this case, as shown in merged code 1, the difference management device 16 of the first embodiment does not merge some code 1 because the ID of the button element in output code 1 (123) and the ID of the button element in output code 2 (456) are different. In the second embodiment, a mechanism is proposed to achieve difference merging even in such cases.

[0046] The configuration of the information processing system 10 in the second embodiment is the same as the configuration of the information processing system 10 in the first embodiment shown in Figure 7. Furthermore, the difference management device 16 in the second embodiment includes the same functional blocks as the difference management device 16 in the first embodiment shown in Figure 8.

[0047] In the second embodiment, the difference storage unit 26 of the difference management device 16 stores ID-added difference information, which includes all the codes (including IDs) of the changed elements. The difference recognition unit 44 of the difference management device 16 stores ID-added difference information, which includes all the codes (including IDs) of the elements for which a difference has occurred between the output code before the change and the output code after the change, in the difference storage unit 26.

[0048] The difference application unit 42 of the difference management device 16 determines whether a second element containing the same content as the first element exists in the output code (for example, output code 2) if a first element containing an ID associated with the difference information (for example, a button with ID 123) does not exist in the output code (for example, output code 2) in the ID-added difference information stored in the difference storage unit 26.

[0049] In the second embodiment, "containing the same content as the first element" means that it is the same part (the same type of element) and contains the same properties. Here, properties are those excluding the ID; for example, in the button element of output code 2, the property is "text: 'Login'". In the example in Figure 10, the difference application unit 42 detects the button element with ID 456 in output code 2 as a second element containing the same content as the element with ID 123 indicated by the difference information.

[0050] If a second element containing the same content as the first element exists in the output code (for example, output code 2), the difference application unit 42 outputs a merged code that reflects the difference information associated with the ID of the first element to the second element (for example, the button with ID 456). In the example in Figure 10, the difference application unit 42 outputs a merged code 2 with some code 1 set for the button element with ID 456.

[0051] Figure 11 is a flowchart showing the operation of the difference management device 16 of the second embodiment. The processes S20-S23 in Figure 11 are the same as the processes S10-S13 in Figure 9, so their explanation is omitted. If an error occurs in the ID-based hunk merging process (N in S24), the difference application unit 42 merges the hunk into the output code based on the identity of the content of the elements included in the output code (S25). If an error occurs in the merging process in S25 (N in S26), the error is displayed on a predetermined display (S27), similar to S15 in Figure 9, and the process proceeds to S28.

[0052] If the hank merge process based on ID is successful (Y in S24), or if the hank merge process based on the identity of the element content is successful (Y in S26), proceed to S28. The processes in S28-S31 are the same as the processes in S16-S19 in Figure 9, so the explanation is omitted.

[0053] According to the difference management device 16 of the second embodiment, even if an element containing an ID associated with the difference information does not exist in the output code before the difference is reflected, the difference information can be reflected in the appropriate element of the output code.

[0054] <Third Embodiment> The third embodiment of this disclosure will be described focusing on the differences from the first embodiment. Components of the third embodiment that are the same as or equivalent to those of the first embodiment will be denoted by the same reference numerals as those of the first embodiment, and explanations that overlap with the description of the first embodiment will be omitted as appropriate.

[0055] Figure 12 shows an example where differences are not correctly merged in the difference management device 16 of the first embodiment. Here, the designer intentionally changed a part on the screen (rectangular button) to a different type of part (round button), causing the ID to change as well (from 123 to 789). In this case, as shown in merged code 1, the difference management device 16 of the first embodiment does not merge some code 1 because the ID of the rectangular button element in output code 1 (123) and the ID of the round button element in output code 2 (789) are different. In the third embodiment, a mechanism is proposed to achieve correct merging of differences even in such cases.

[0056] The configuration of the information processing system 10 in the third embodiment is the same as the configuration of the information processing system 10 in the first embodiment shown in Figure 7. Furthermore, the difference management device 16 in the third embodiment includes the same functional blocks as the difference management device 16 in the first embodiment shown in Figure 8.

[0057] Similar to the second embodiment, in the third embodiment as well, the difference storage unit 26 of the difference management device 16 stores ID-added difference information, which includes all the codes (including IDs) of the changed elements. The difference recognition unit 44 of the difference management device 16 stores ID-added difference information, which includes all the codes (including IDs) of the elements for which a difference has occurred between the output code before the change and the output code after the change, in the difference storage unit 26.

[0058] In the third embodiment, the difference management device 16 further stores information on predetermined groups of elements of the same type (referred to here as "parts group"). The information on the parts group may include, for example, information defining group A, which includes rectangular buttons (RectangleButton), round buttons (RoundButton), and icon buttons (IconButton), and group B, which includes checkboxes, radio buttons, and switches.

[0059] The difference application unit 42 of the difference management device 16, if a first element (for example, a rectangular button with ID 123) containing an ID associated with the difference information in the ID-added difference information stored in the difference storage unit 26 does not exist in the output code (for example, output code 2), refers to information of a predetermined group of parts to determine whether a second element belonging to the same group of parts as the first element exists in the output code (for example, output code 2).

[0060] If a second element belonging to the same parts group as the first element exists in the output code (for example, output code 2), the difference application unit 42 outputs a merged code that reflects the difference information associated with the ID of the first element to the second element (for example, the round button with ID 789). In the example in Figure 12, the difference application unit 42 outputs a merged code 2 with some code 1 set for the round button element with ID 789.

[0061] The operation of the difference management device 16 in the third embodiment is the same as replacing the process at S25 in the flowchart of Figure 11 with merging hunks based on the identity of the parts group.

[0062] According to the difference management device 16 of the third embodiment, even if an element containing an ID associated with the difference information does not exist in the output code before the difference is reflected, the difference information can be reflected in the appropriate element of the output code.

[0063] <Example 1> Modification 1 relating to the second and third embodiments will now be described. In the second and third embodiments, the ID-added difference information includes all the codes of the changed element. As a modification, similar to the first embodiment, the ID-added difference information includes the element's ID and the difference, but does not have to include codes that are not differences (codes that are the same before and after the change) (for example, the difference information in Figure 6). In this case, the output code temporary storage unit 28 continues to retain the output code before modification (for example, output code 1 in Figures 10 and 12) even after saving the ID-added difference information. As a result, in the difference merge process for the new output code (for example, output code 2 in Figures 10 and 12), the content of the first element can be identified by referring to the previous output code (for example, output code 1 in Figures 10 and 12) (processing in the second embodiment), and the group to which the first element belongs can be identified (processing in the third embodiment).

[0064] <Fourth Embodiment> The fourth embodiment of this disclosure will be described focusing on the differences from the first embodiment. Components of the fourth embodiment that are the same as or equivalent to those of the first embodiment will be denoted by the same reference numerals as those of the first embodiment, and explanations that overlap with the description of the first embodiment will be omitted as appropriate.

[0065] In the fourth embodiment, we propose a configuration that combines the differential merging method of the first embodiment with a conventional differential merging method. The configuration of the information processing system 10 in the fourth embodiment is the same as the configuration of the information processing system 10 in the first embodiment shown in Figure 7.

[0066] Figure 13 is a block diagram showing the functional blocks of the difference management device 16 of the fourth embodiment. The difference management device 16 includes a first difference storage unit 30 and a second difference storage unit 32 instead of a difference storage unit 26. The difference management device 16 also includes a first difference application unit 46 and a second difference application unit 48 instead of a difference application unit 42. Furthermore, the difference management device 16 includes a first difference recognition unit 50 and a second difference recognition unit 52 instead of a difference recognition unit 44.

[0067] The first differential storage unit 30 is the same as the differential storage unit 26 in the first embodiment, that is, it stores ID-added differential information. The second differential storage unit 32 stores differential information using conventional methods (hereinafter also referred to as "conventional differential information"). Conventional differential information is information that associates information about the position where the output code has been changed with differential information associated with the change in the output code; in other words, it is information that shows the difference based on the position within the output code.

[0068] The first difference application unit 46 is the same as the difference application unit 42 in the first embodiment and performs difference merging processing based on IDs. That is, the first difference application unit 46 reflects the difference information associated with the ID in the element of the output code corresponding to that ID.

[0069] The second difference application unit 48 performs difference merging processing using a conventional method. Specifically, if the difference merging processing by the first difference application unit 46 fails, the second difference application unit 48 generates a merged code by reflecting the difference information associated with the changed position in the output code indicated by the conventional difference information.

[0070] As partially described above, in conventional methods, the modified position may be identified by a pair of line and indentation in the output code. Alternatively, in conventional methods, the modified position may be identified by the string before and / or after the modified position in the output code. Furthermore, the modified position may be identified by a combination of a pair of line and indentation in the output code and the strings before and after the modified position in the output code.

[0071] The first difference recognition unit 50 is the same as the difference recognition unit 44 in the first embodiment, and stores ID-added difference information indicating the difference between the output code and the modified code in the first difference storage unit 30. The second difference recognition unit 52 compares the output code and the modified code, creates conventional difference information indicating the difference between the output code and the modified code, and stores the conventional difference information, which associates the position where the output code was changed with the difference information, in the second difference storage unit 32.

[0072] Figure 14 is a flowchart showing the operation of the difference management device 16 of the fourth embodiment. The processing in S40-S43 is the same as S10-S13 in Figure 9, so the explanation is omitted. If an error occurs in the hunk merge processing based on the ID by the first difference application unit 46 (N in S44), and conventional difference information is stored in the second difference storage unit 32 (Y in S45), the second difference application unit 48 executes a difference merge processing using the conventional method based on the conventional difference information (S46).

[0073] If conventional difference information is not saved (N in S45), or if an error occurs during the merge process in S46 (N in S47), the error is displayed on a designated display (S48), similar to S15 in Figure 9, and the process proceeds to S49. If the ID-based hunk merge process is successful (Y in S44), or if the conventional method of merging hunks is successful (Y in S47), the process proceeds to S49.

[0074] The processes in S49 and S50 are the same as those in S16 and S17 in Figure 9, so their explanation is omitted. If a modified code with a changed output code is stored in the output code storage device 15 (Y in S51), the first difference recognition unit 50 stores ID-added difference information indicating the difference between the output code and the modified code based on the ID in the first difference storage unit 30 (S52). The second difference recognition unit 52 stores conventional difference information indicating the difference between the output code and the modified code based on the position in the second difference storage unit 32 (S53). If the output code is not changed (N in S51), the processes in S52 and S53 are skipped.

[0075] Furthermore, in each loop process from S43 to S49, it is desirable that the hunks targeted for merging by the first difference application unit 46 in S43 and the hunks targeted for merging by the second difference application unit 48 in S46 are based on the same modification. For this reason, the first difference recognition unit 50 and the second difference recognition unit 52 may record the correspondence between hunks and ID-added difference information and conventional difference information. The first difference application unit 46 and the second difference application unit 48 may target hunks that correspond to each other in the merging process of S43 and the merging process of S46 in each loop process from S43 to S49 for merging. The same applies to the fifth and sixth embodiments described later.

[0076] According to the difference management device 16 of the fourth embodiment, even if difference merging based on the ID for the output code fails, difference information can be reflected in the appropriate position of the output code by performing difference merging using the conventional method.

[0077] <Fifth Embodiment> The fifth embodiment of this disclosure will be described focusing on the differences from the first embodiment. Components of the fifth embodiment that are the same as or equivalent to those of the first embodiment will be denoted by the same reference numerals as those of the first embodiment, and explanations that overlap with the description of the first embodiment will be omitted as appropriate.

[0078] In the fifth embodiment, we propose a configuration that combines the differential merging method of the first embodiment with a conventional differential merging method. The configuration of the information processing system 10 in the fifth embodiment is the same as the configuration of the information processing system 10 in the first embodiment shown in Figure 7. Furthermore, the differential management device 16 in the fifth embodiment has the same functional blocks as the differential management device 16 in the fourth embodiment shown in Figure 13.

[0079] In the fourth embodiment, the differential merge process based on IDs is performed first, and if the merge fails, the differential merge process using the conventional method is performed. However, in the fifth embodiment, the differential merge process using the conventional method is performed first, and if the merge fails, the differential merge process based on IDs is performed.

[0080] Figure 15 is a flowchart showing the operation of the difference management device 16 of the fifth embodiment. The processes of S60 and S61 are the same as the processes of S10 and S11 in Figure 9, so their explanation is omitted. If conventional difference information is stored in the second difference storage unit 32 (Y in S62), the second difference application unit 48 performs a difference merge process using the conventional method based on the conventional difference information (S63). If an error occurs in the merge process of S63 (N in S64), and ID-added difference information is stored in the first difference storage unit 30 (Y in S65), the first difference application unit 46 performs a hunk merge process based on the ID (S66).

[0081] If ID-added difference information is not stored (N in S65), or if an error occurs during the merge process in S66 (N in S67), the error is displayed on a designated display (S68), similar to S15 in Figure 9, and the process proceeds to S69. If the conventional method of merging hunks is successful (Y in S64), or if the ID-based merging process of hunks is successful (Y in S67), the process also proceeds to S69. The processes in S69-S73 are the same as the processes in S49-S53 in Figure 14, so their explanation is omitted. If conventional difference information is not stored in the second difference storage unit 32 (N in S62), the difference merge process in S63-S70 is skipped.

[0082] According to the difference management device 16 of the fifth embodiment, even if a conventional difference merge (difference merge based on position within the code) for the output code fails, difference information can be reflected in the appropriate position of the output code by performing a difference merge based on the ID.

[0083] <Sixth Embodiment> The sixth embodiment of this disclosure will be described focusing on the differences from the first embodiment. Components of the sixth embodiment that are the same as or equivalent to those of the first embodiment will be denoted by the same reference numerals as those of the first embodiment, and explanations that overlap with the description of the first embodiment will be omitted as appropriate.

[0084] In the sixth embodiment, we propose a configuration that combines the differential merging method of the first embodiment with a conventional differential merging method. The configuration of the information processing system 10 in the sixth embodiment is the same as the configuration of the information processing system 10 in the first embodiment shown in Figure 7, but the user terminal 12 and the differential management device 16 communicate via a communication network. In addition, the differential management device 16 of the sixth embodiment further includes a determination unit (not shown) in addition to the functional blocks provided by the differential management device 16 of the fourth embodiment shown in Figure 13.

[0085] The first difference application unit 46 of the difference management device 16 executes a difference merge process based on IDs, regardless of whether the difference merge process performed by the second difference application unit 48 is successful or not. The structured data resulting from the ID-based difference merge by the first difference application unit 46 will also be referred to below as "Merge Result 1". The second difference application unit 48 of the difference management device 16 executes a difference merge process using a conventional method, regardless of whether the difference merge process performed by the first difference application unit 46 is successful or not. The structured data resulting from the position-based difference merge by the second difference application unit 48 will also be referred to below as "Merge Result 2".

[0086] The decision unit of the difference management device 16 presents both merge result 1 and merge result 2 to the user and accepts the user's selection of which of merge result 1 or merge result 2 to adopt. The decision unit then merges either merge result 1 or merge result 2 into the output code according to the user's selection; in other words, it reflects either merge result 1 or merge result 2 selected by the user into the output code.

[0087] Figure 16 is a flowchart showing the operation of the difference management device 16 of the sixth embodiment. The processes in S80 and S81 are the same as the processes in S10 and S11 in Figure 9. If neither the ID-added difference information nor the conventional difference information is saved (N in S82), the subsequent difference application process is skipped.

[0088] If both ID-added difference information and conventional difference information are stored (Y in S82), the first difference application unit 46 provisionally merges one hunk based on the ID (S83). If the merge is successful (Y in S84), the first difference application unit 46 saves merge result 1 in which that one hunk has been merged (S85). If an error occurs during the merge (N in S84), that one hunk is discarded (S86).

[0089] The second difference application unit 48 provisionally merges one hunk using the conventional method (S87). If the merge is successful (Y in S88), the first difference application unit 46 saves merge result 2 in which that one hunk has been merged (S89). If an error occurs during the merge (N in S88), that one hunk is discarded (S90). The pair of processes S83-86 and the pair of processes S87-S90 may be executed in either order or in parallel.

[0090] Figure 17 is a flowchart showing the operation of the difference management device 16 following Figure 16. When both merge result 1 and merge result 2 are saved (i.e., when both ID-based difference merging and conventional difference merging are successful) (Y in S100), the decision unit determines whether merge result 1 and merge result 2 match. If merge result 1 and merge result 2 match (Y in S101), the decision unit performs a final merge of either merge result 1 or merge result 2 into the output code, in other words, reflects either merge result 1 or merge result 2 in the output code (S102). In S102, either merge result 1 or merge result 2 may be used.

[0091] If merge result 1 and merge result 2 do not match (N in S101), the decision unit sends both merge result 1 and merge result 2 to the user's user terminal 12 (S103). The user terminal 12 displays both merge result 1 and merge result 2 on its display, and the user selects which of merge result 1 or merge result 2 to adopt. The user terminal 12 sends the user's selection result to the difference management device 16, and the decision unit accepts the user's selection result. The decision unit then performs a final merge of either merge result 1 or merge result 2, selected by the user, into the output code (S104).

[0092] If only one of merge result 1 or merge result 2 is saved (i.e., only one of the ID-based differential merge or the conventional differential merge is successful) (N in S100 and Y in S105), the determination unit performs the final merge of the saved merge result into the output code (S106). If neither merge result 1 nor merge result 2 is saved (i.e., both the ID-based differential merge and the conventional differential merge fail) (N in S105), an error is displayed on a predetermined display, similar to S15 in Figure 9 (S107). The subsequent processing in S108-S112 is the same as the processing in S49-S53 in Figure 14, so the explanation is omitted.

[0093] Figure 18 shows an example of the code output in the sixth embodiment. Figure 18 shows a situation where the same ID is assigned to different elements in input data 2 and output code 2. Merged code 1 shows the differential merge result by the differential management device 16 of embodiment 1. In merged code 1, some code 2 is attached to both the button element and the text field element, meaning it is an incorrect merge result. On the other hand, merged code 2 shows the differential merge result using the conventional method, where some code 1 and some code 2 are correctly merged.

[0094] In the sixth embodiment, the difference management device 16 presents both merge result 1 and merge result 2 shown in Figure 18 to the user during the merging process of the hunk of some code 1. By selecting merge result 2, the user is provided with a merged code that has the same content as merged code 2. Thus, according to the difference management device 16 of the sixth embodiment, difference information can be reflected in the appropriate position of the output code with even greater accuracy, based on the user's judgment.

[0095] <Modification 2> Modification 2 relating to the fourth, fifth, and sixth embodiments will now be described. In the fourth, fifth, and sixth embodiments, the differential merging method of the first embodiment was combined with the conventional differential merging method. However, as a modification, the differential merging method of the second embodiment may be combined with the conventional differential merging method, or the differential merging method of the third embodiment may be combined with the conventional differential merging method.

[0096] The present disclosure has been described above based on the first to sixth embodiments. Each embodiment is illustrative, and it will be understood by those skilled in the art that various modifications are possible in the combination of components or processing processes of each embodiment, and that such modifications are also within the scope of the present disclosure.

[0097] Any combination of the embodiments and modifications described above is also useful as an embodiment of the present disclosure. The new embodiments resulting from such combinations will possess the combined effects of the respective embodiments and modifications. Furthermore, it will be understood by those skilled in the art that the functions to be performed by each constituent element described in the claims can be achieved by each component shown in the embodiments and modifications individually or in combination thereof. In addition, where terms such as "first," "second," etc. are used in this specification or in the claims, unless otherwise specified, they do not indicate any order or importance, but are used to distinguish one configuration from another.

[0098] <Note> Based on the above description of embodiments and modifications, the following technology is disclosed. [Technology 1] An information processing device comprising a storage unit that stores identification information for each element of structured data and difference information resulting from changes to each element of the structured data in association, Each element obtains a first structured data containing identification information, The system outputs a second structured data in which each element of the first structured data reflects the difference information associated with the identification information of each element. Information processing methods. This information processing method allows for the output of structured data that reflects changes made by the user to the previously outputted structured data. This eliminates the need for the user to make the same changes again, reducing the user burden and preventing omissions in changes to structured data. [Technology 2] If a first element containing identification information associated with the difference information does not exist in the first structured data, and a second element containing the same content as the first element exists in the first structured data, then the second structured data is output, in which the difference information associated with the identification information of the first element is reflected in the second element. The information processing method described in Technical 1. According to this information processing method, even if an element containing the identification information associated with the differential information does not exist in the structured data before the differential information is reflected, the differential information can be reflected in the appropriate element of the structured data. [Technology 3] If a first element containing identification information associated with the difference information does not exist in the first structured data, and a second element belonging to the same group as the first element exists in the first structured data, then the second structured data is output in which the difference information associated with the identification information of the first element is reflected in the second element. The information processing method described in Technical 1. According to this information processing method, even if an element containing the identification information associated with the differential information does not exist in the structured data before the differential information is reflected, the differential information can be reflected in the appropriate element of the structured data. [Technology 4] The storage unit further stores information regarding the location where the structured data has been changed, and differential information associated with the change in the structured data, in association with each other. If it fails to reflect the difference information associated with the identification information in the first structured data, the second structured data reflecting the difference information associated with the changed position in the first structured data is output. The information processing method described in Technical 1. This information processing method allows for the reflection of differential information into structured data at the appropriate location within the structured data, even if the process fails to reflect differential information based on identification information. [Technology 5] The storage unit further stores information regarding the location where the structured data has been changed, and differential information associated with the change in the structured data, in association with each other. The system presents the user with a second structured data in which each element of the first structured data reflects difference information associated with the identification information of each element, and a third structured data in which the modified position in the first structured data reflects difference information associated with that position, and accepts the user's selection of which of the second and third structured data to adopt. The information processing method described in Technical 1. This information processing method allows for the reflection of differential information in the appropriate location of structured data with greater accuracy, based on the user's judgment. [Technology 6] The aforementioned element is a block of code within the structured data. The information processing method described in Technical 1. This information processing method allows for the appropriate configuration of elements within structured data as units for managing differences. [Technology 7] The aforementioned elements are provided in units of parts arranged on the screen, The information processing method described in Technical 1. This information processing method allows for the appropriate configuration of elements within structured data as units for managing differences. [Technology 8] The aforementioned elements are provided in the source code as either classes, methods, functions, or structures. The information processing method described in Technical 1. This information processing method allows for the appropriate configuration of elements within structured data as units for managing differences. [Technology 9] The first structured data is based on design data that shows the screen layout. The information processing method described in Technical 1. This information processing method can support the modification of structured data based on design data. [Technology 10] The second structured data includes source code, The information processing method described in Technical 1. This information processing method can help streamline development work using structured data. [Technology 11] The second element is of the same type as the first element and contains the same properties. Information processing method as described in Technical 2. This information processing method allows for the proper detection of a second element that contains the same content as the first element. [Technology 12] A storage unit that stores identification information for each element of structured data and difference information associated with changes to each element of the structured data in association with each other, An acquisition unit that acquires first structured data to which identification information is assigned to each element, A difference application unit outputs a second structured data in which each element of the first structured data reflects difference information associated with the identification information of each element, An information processing device equipped with the following features. According to this information processing device, when outputting structured data, it can output structured data that reflects the changes made by the user to the previously outputted structured data. This eliminates the need for the user to make the same changes again, reducing the burden on the user and preventing omissions in changes to structured data. [Technology 13] An information processing device comprising a storage unit that stores identification information for each element of structured data and difference information resulting from changes to each element of the structured data in association, Obtain a first structured data in which identification information is assigned to each element. The system outputs a second structured data in which each element of the first structured data reflects the difference information associated with the identification information of each element. A computer program designed to perform a task. According to this computer program, when outputting structured data, it is possible to output structured data that reflects the changes made by the user to the previously outputted structured data. This eliminates the need for the user to make the same changes again, reducing the burden on the user and preventing omissions in changes to structured data. [Industrial applicability]

[0099] The technology disclosed herein can be applied to information processing devices and information processing systems. [Explanation of Symbols]

[0100] 10 Information processing system, 12 User terminal, 14 Conversion device, 16 Difference management device, 26 Difference storage unit, 30 First difference storage unit, 32 Second difference storage unit, 40 Output code acquisition unit, 42 Difference application unit, 44 Difference recognition unit, 46 First difference application unit, 48 Second difference application unit, 50 First difference recognition unit, 52 Second difference recognition unit.

Claims

1. An information processing device comprising a storage unit that stores identification information for each element of structured data and difference information resulting from changes to each element of the structured data in association, Each element obtains a first structured data containing identification information, The system outputs a second structured data in which each element of the first structured data reflects the difference information associated with the identification information of each element. Information processing methods.

2. If a first element containing identification information associated with the difference information does not exist in the first structured data, and a second element containing the same content as the first element exists in the first structured data, then the second structured data is output, in which the difference information associated with the identification information of the first element is reflected in the second element. The information processing method according to claim 1.

3. If a first element containing identification information associated with the difference information does not exist in the first structured data, and a second element belonging to the same group as the first element exists in the first structured data, then the second structured data is output in which the difference information associated with the identification information of the first element is reflected in the second element. The information processing method according to claim 1.

4. The storage unit further stores information regarding the location where the structured data has been changed, and differential information associated with the change in the structured data, in association with each other. If it fails to reflect the difference information associated with the identification information in the first structured data, the second structured data reflecting the difference information associated with the changed position in the first structured data is output. The information processing method according to claim 1.

5. The storage unit further stores information regarding the location where the structured data has been changed, and differential information associated with the change in the structured data, in association with each other. The system presents the user with a second structured data in which each element of the first structured data reflects difference information associated with the identification information of each element, and a third structured data in which the modified position in the first structured data reflects difference information associated with that position, and accepts the user's selection of which of the second and third structured data to adopt. The information processing method according to claim 1.

6. The aforementioned element is a block of code within the structured data. The information processing method according to claim 1.

7. The aforementioned elements are provided in units of parts arranged on the screen, The information processing method according to claim 1.

8. The aforementioned elements are provided in the source code as either classes, methods, functions, or structures. The information processing method according to claim 1.

9. The first structured data is based on design data that shows the screen layout. The information processing method according to claim 1.

10. The second structured data includes source code, The information processing method according to claim 1.

11. The second element is of the same type as the first element and contains the same properties. The information processing method according to claim 2.

12. A storage unit that stores identification information for each element of structured data and difference information associated with changes to each element of the structured data in association with each other, An acquisition unit that acquires first structured data to which identification information is assigned to each element, A difference application unit outputs a second structured data in which each element of the first structured data reflects difference information associated with the identification information of each element, An information processing device equipped with the following features.

13. An information processing device comprising a storage unit that stores identification information for each element of structured data and difference information resulting from changes to each element of the structured data in association, Obtain a first structured data in which identification information is assigned to each element. The system outputs a second structured data in which each element of the first structured data reflects the difference information associated with the identification information of each element. A computer program designed to perform a task.

Citation Information

Patent Citations

  • Design generating device

    JP2023074436A