A Separate Project Development Method, System, Storage Medium, and Electronic Device
By splitting the project into multiple independent sub-projects and realizing communication between sub-projects, the problem of repeated code in traditional software development is solved, and the development efficiency and system stability are improved.
Patent Information
- Application Number
- CN202510278591.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-03-10
AI Technical Summary
The traditional software development model lacks modularity and reuse mechanisms in large and complex projects, resulting in problems such as more duplicate code, low development efficiency and high maintenance costs.
Split the project into multiple independent sub-projects, and realize data interaction between sub-projects through preset communication protocols, and use Socket communication protocols to ensure the effectiveness and security of data interaction.
It significantly improves the project's development efficiency, code reusability, testing efficiency and system stability, and solves the problem of low development efficiency.
Smart Images

Figure CN119806494B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of project development, and more particularly, to a split project development method and system, a storage medium, and an electronic device. Background Art
[0002] In modern software development practices, as the scale and complexity of projects continue to increase, traditional development models face numerous challenges. Traditional software development usually develops and tests a project as a whole. Although this approach may be effective in small projects, in large and complex projects, its drawbacks gradually become apparent. For example, between different projects, although there are modules with similar functions, due to the lack of an effective modularization and reuse mechanism, a large amount of duplicate code appears. This phenomenon not only reduces development efficiency but also increases maintenance costs.
[0003] In response to the above problems, there is currently no good solution. Summary of the Invention
[0004] Embodiments of the present invention provide a split project development method and system, a storage medium, and an electronic device to at least solve the problem of low development efficiency in related technologies.
[0005] According to an embodiment of the present invention, a split project development method is provided, including:
[0006] Obtain project information, where the project information includes the project information of the target project to be processed;
[0007] Split the target project according to a preset splitting rule to obtain a number of sub-projects;
[0008] Connect the sub-projects to a preset first APP through a preset communication protocol, and perform data interaction with the sub-projects through the first APP.
[0009] In an exemplary embodiment, the performing data interaction with the sub-projects through the first APP includes:
[0010] Obtain an interaction instruction;
[0011] Parse the interaction instruction through the first APP to obtain interaction information, where the interaction information includes interaction object information and interaction action information, and the interaction object includes the sub-projects;
[0012] Send the interaction action information to the interaction object according to the interaction object information to instruct the interaction object to perform an interaction action according to the interaction action information.
[0013] In an exemplary embodiment, the communication protocol at least includes the Socket communication protocol.
[0014] In an exemplary embodiment, the splitting of the target project according to a preset splitting rule to obtain a number of sub-projects includes:
[0015] Performing project analysis on the target project to obtain the project information, where the project information includes at least any one of engineering reuse degree, project interface quantity, general protocol quantity, and mechanism dependency value;
[0016] Performing requirement matching processing according to the project information to determine sub-project information, where the sub-project information includes at least any one of engineering boundary and engineering function;
[0017] Performing independent project construction processing on the engineering objects in the target project based on the sub-project information and the splitting rule to obtain the sub-projects.
[0018] In an exemplary embodiment, after performing independent project construction processing on the engineering objects in the target project based on the sub-project information and the splitting rule to obtain the sub-projects, the method further includes:
[0019] Performing engineering testing on the sub-projects to determine the function coverage information, interface interaction information, and stability information of the sub-projects;
[0020] Constructing a first test matrix based on the function coverage information, interface interaction information, and stability information, and constructing a second test matrix according to the sub-project information;
[0021] Calculating the correlation value between the first test matrix and the second test matrix, and determining that the sub-project is normal when the correlation value meets the preset conditions, otherwise determining that the sub-project is abnormal.
[0022] According to another embodiment of the present invention, a split project development system is provided, including:
[0023] A project information acquisition module, configured to acquire project information, where the project information includes the project information of a target project to be processed;
[0024] A project splitting module, configured to split the target project according to a preset splitting rule to obtain a number of sub-projects;
[0025] An interaction module, configured to connect the sub-projects to a preset first APP through a preset communication protocol, and perform data interaction with the sub-projects through the first APP.
[0026] In an exemplary embodiment, the data interaction with the sub-project through the first APP includes:
[0027] Obtain an interaction instruction;
[0028] Parse the interaction instruction through the first APP to obtain interaction information, where the interaction information includes interaction object information and interaction action information, and the interaction object includes the sub-project;
[0029] Send the interaction action information to the interaction object according to the interaction object information to instruct the interaction object to perform an interaction action according to the interaction action information.
[0030] In an exemplary embodiment, the communication protocol at least includes the Socket communication protocol.
[0031] According to another embodiment of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program is set to execute the steps in any one of the above method embodiments when running.
[0032] According to another embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, a computer program is stored in the memory, and the processor is set to run the computer program to execute the steps in any one of the above method embodiments.
[0033] Through the present invention, since the project is split into multiple independent sub-projects, and the communication and data interaction between the sub-projects are realized through a preset communication protocol, the development efficiency, code reusability, test efficiency and system stability of the project can be significantly improved. Therefore, the problem of low development efficiency can be solved, and the effect of improving the project development efficiency can be achieved. Description of the Drawings
[0034] Figure 1 is a flowchart of a split project development method according to Embodiment 1 of the embodiments of the present invention;
[0035] Figure 2 is a structural block diagram of a split project development system according to Embodiment 1 of the embodiments of the present invention. Detailed Embodiments
[0036] Next, the technical solutions in the embodiments of the present application will be described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.
[0037] Hereinafter, terms such as "first", "second", etc. are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first", "second", etc. may explicitly or implicitly include one or more such features. In the description of this application, unless otherwise specified, the meaning of "a plurality" is two or more.
[0038] In addition, in this application, orientation terms such as "upper", "lower", "left", "right", etc. may include but are not limited to being defined relative to the schematic placement of components in the drawings. It should be understood that these directional terms may be relative concepts, which are used for relative description and clarification and may change correspondingly according to the change in the orientation of the components placed in the drawings.
[0039] In this application, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or integrated; it can be directly connected or indirectly connected through an intermediate medium. In addition, the term "coupling" can be a way of electrical connection for signal transmission.
[0040] As used herein, "about", "substantially", or "approximately" includes the stated value and the average value within an acceptable deviation range of the specific value, where the acceptable deviation range is determined by those of ordinary skill in the art considering the measurement being discussed and the errors associated with the measurement of a particular quantity (i.e., the limitations of the measurement system).
[0041] In the practice of software development, code duplication is a common phenomenon. Although developers usually improve code reusability through the encapsulation of functions or methods, there are still cases where there is a high degree of similarity in local code between different projects. Facing this challenge, how to effectively reduce cross-project code duplication and improve code reusability has become a key issue in improving development efficiency.
[0042] Code duplication between different projects not only weakens the maintainability of the code but also significantly reduces development efficiency. Duplicate code means more workload and the risk of needing to synchronously update multiple places when modifying one place, which increases the probability of errors and maintenance costs.
[0043] Embodiment 1
[0044] To solve the above problems, a separated project development method is provided in this embodiment. Figure 1 is a flowchart of a separated project development method according to an embodiment of the present invention, as Figure 1 shown, and this process includes the following steps:
[0045] Step S11: Obtain project information, where the project information includes the project information of the target project to be processed;
[0046] In this embodiment, first determine the name, size, function, etc. of the target project to be separated, so as to facilitate subsequent project separation based on this project information.
[0047] Among them, the project information includes key information such as the name, goal, requirements, resources (software and hardware resources), schedule, project function, project size, programming language, framework, database, middleware, etc. that the project wants to implement.
[0048] For example, taking a project named ArmGuiderPro (upper limb rehabilitation training) as an example, this project includes 6 functional modules such as UI (User Interface), GAME, EyeTracker, API (Application Programming Interface), Driver, and APP. The function information and module information corresponding to these functional modules are part of the project information.
[0049] Or taking the BalMaster (balance control training) project as an example, the project includes 5 functional modules such as UI, GAME, API, Driver, and APP. It is easy to find that the 5 functional modules of UI, GAME, API, Driver, and APP are modules with a high reuse rate, so these 5 modules are modules that can be separated.
[0050] Step S12: Split the target project according to the preset separation rules to obtain several sub-projects;
[0051] In this embodiment, the separation rules can be determined based on dimensions such as functional modules, technology stacks, and team division of labor; each sub-project should have independent functions or tasks and be able to be independently developed, tested, and deployed; moreover, a unique identifier (ID) needs to be assigned to each sub-project, and the dependency relationships and interface specifications between sub-projects should be recorded to ensure that the sub-projects can be adjusted according to the dependency relationships, interface specifications, etc. in the future.
[0052] For example, taking the ArmGuiderPro project as an example, this project can be split into 6 sub-projects such as UI, GAME, EyeTracker, API, Driver, and APP.
[0053] Or taking the BalMaster project as an example, this project can be split into 5 sub-projects such as UI, GAME, API, Driver, and APP.
[0054] Step S13, connect the sub-project to a preset first APP through a preset communication protocol, and perform data interaction with the sub-project through the first APP.
[0055] In this embodiment, when connecting the sub-project to the first APP, it is necessary to make adaptive adjustments according to the development platform and the corresponding communication protocol to ensure the effective progress of data interaction.
[0056] Among them, for the selection of the communication protocol, if the sub-project is an embedded device and is in the same local area network as the first APP, Wi-Fi or Ethernet can be selected; if low-power and short-distance communication is required, Bluetooth or ZigBee can be selected; if remote communication is required, MQTT or HTTP / HTTPS can be selected; if more emphasis is placed on reusability, the Socket communication protocol can be adopted; similarly, for the development platform, for microcontrollers (MCUs), ESP32 (supporting Wi-Fi and Bluetooth), STM32, Arduino, etc. can be selected, for single-board computers, Raspberry Pi, Jetson Nano (NVIDIA Jetson Nano development kit), etc. can be selected; for the hardware interface circuit, it is necessary to ensure the stable connection between the communication module and the main control chip (MCU). At this time, the UART can be used to connect the Wi-Fi module, or the SPI can be used to connect the Ethernet module; for the interaction logic, the client or server logic of the communication protocol can be implemented on the embedded device of the sub-project. For example, when using the MQTT protocol, the MQTT client can be implemented to subscribe to and publish topics; when using the HTTP protocol, the HTTP client can be implemented to send GET / POST requests; in particular, for the format of data interaction, JSON, XML, or a custom binary format can be used; and TLS / SSL is used to encrypt the communication data, or username and password authentication is enabled in MQTT to ensure the security of the data.
[0057] Through the above steps, since the project is split into multiple independent sub-projects and the communication and data interaction between sub-projects are achieved through a preset communication protocol, the development efficiency, code reusability, test efficiency, and system stability of the project can be significantly improved, solving the problem of low project development efficiency and improving the project development efficiency.
[0058] In an alternative embodiment, the data interaction between the first APP and the sub-project includes:
[0059] Step S131, obtain an interaction instruction;
[0060] Step S132: Parse the interaction instruction through the first APP to obtain interaction information, where the interaction information includes interaction object information and interaction action information, and the interaction object includes the sub-project.
[0061] Step S133: Send the interaction action information to the interaction object according to the interaction object information to instruct the interaction object to perform an interaction action according to the interaction action information.
[0062] In this embodiment, after receiving a user's interaction instruction, first parse the interaction instruction, and then send relevant information to the corresponding sub-project through the APP according to the parsing result to instruct the sub-project to perform a corresponding interaction action according to the instruction; this facilitates the addition or replacement of sub-projects, so as to make adjustments in the case of problems with a certain sub-project and ensure the stability of the system.
[0063] Taking the ArmGuiderPro project as an example, after splitting the project into 6 sub-projects such as UI, GAME, EyeTracker, API, Driver, and APP, the APP then connects all the projects.
[0064] At this time, Socket communication is adopted between the APP and other projects, and there is a common communication protocol between the APP and each project. The protocol defines that the communication content should include "instruction" and "content".
[0065] Subsequently, the APP will first receive messages from each project through Socket communication; after receiving the messages, the APP parses the "instruction" and "content" contained in the messages according to the protocol. The "instruction" contains the "work" to be done and the "work object" (for example: the parsed "instruction" is "forward to UI"); then the "content" in the message is operated according to the "instruction" (for example: forward to UI), thus realizing communication between different projects.
[0066] In an optional embodiment, the splitting of the target project according to a preset separation rule to obtain a number of sub-projects includes:
[0067] Step S121: Perform project analysis on the target project to obtain the project information, where the project information includes at least any one of engineering reuse degree, project interface quantity, general protocol quantity, and mechanism dependency value;
[0068] Step S122: Perform requirement matching processing according to the project information to determine sub-project information, where the sub-project information includes at least any one of engineering boundary and engineering function;
[0069] Step S123: Based on the sub-project information and the separation rules, perform independent project construction processing on the engineering objects in the target project to obtain the sub-projects.
[0070] In this embodiment, when splitting a project, information such as the reuse degree and boundaries corresponding to the functional modules needs to be considered to ensure the accuracy of the splitting result.
[0071] Among them, the engineering reuse degree refers to the proportion of resources such as reusable code, modules, functions, or design patterns in the project. A high reuse degree means reducing duplicate development, improving efficiency, and reducing costs; the mechanism dependency value refers to the complexity of the dependency relationships between components or modules in the project, including functional dependencies, data dependencies, or architectural dependencies. A high dependency value increases the difficulty and risk of maintenance; the engineering boundary includes at least any one of the functional scope, callable rules, usable interfaces, etc.
[0072] The reuse degree R can be achieved through the following formula:
[0073] (Formula 1)
[0074] In the formula, n is the number of factors to be considered for the reuse degree, is the weight of the i-th factor, indicating the importance of this factor in the reuse degree evaluation; is the score of the i-th factor, indicating the performance of the system in this factor; is the dependency degree of the i-th factor, indicating the degree of dependence of the module on a specific external environment; among them, the factor includes generality, independence, interface standardization degree, scalability, historical reuse situation, user requirements, etc.
[0075] Specifically, in addition to splitting in the above manner, NLP can also be used to parse code comments and API documents to construct a module business portrait. Subsequently, based on the graph neural network (GNN), analyze the code call chain to generate a module dependency topology graph, and then perform splitting according to the preset splitting decision model (including reuse degree, dependency degree, containerization cost of converting a certain module into a container, etc.) and the module dependency topology graph to obtain the split sub-projects.
[0076] Taking the ArmGuiderPro project as an example, first input the ArmGuiderPro project code, then extract the semantic features of modules such as UI and GAME, then generate a 3D module topology view, and finally, through AI, recommend the optimal splitting scheme, such as separating EyeTracker as an independent container, and so on, to achieve the dynamic splitting of the project.
[0077] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0078] In this embodiment, a separate project development system is also provided. This system is used to implement the above embodiments and preferred implementation methods, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0079] Figure 2 is a structural block diagram of a separate project development system according to an embodiment of the present invention, as Figure 2 shown, the system includes:
[0080] A project information acquisition module 21, configured to acquire project information, where the project information includes the project information of a target project to be processed;
[0081] A project splitting module 22, configured to split the target project according to a preset splitting rule to obtain a number of sub-projects;
[0082] An interaction module 23, configured to connect the sub-projects to a preset first APP through a preset communication protocol, and perform data interaction with the sub-projects through the first APP.
[0083] In an optional embodiment, the data interaction with the sub-projects through the first APP includes:
[0084] Obtain an interaction instruction;
[0085] Parse the interaction instruction through the first APP to obtain interaction information, where the interaction information includes interaction object information and interaction action information, and the interaction object includes the sub-projects;
[0086] Send the interaction action information to the interaction object according to the interaction object information to instruct the interaction object to perform an interaction action according to the interaction action information.
[0087] In an optional embodiment, the communication protocol at least includes the Socket communication protocol.
[0088] It should be noted that the above-mentioned modules can be implemented by software or hardware. For the latter, it can be achieved in the following ways, but not limited to: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules are respectively located in different processors in any combination form.
[0089] Embodiment 2
[0090] The difference from Embodiment 1 is that after performing independent engineering construction processing on the engineering objects in the target project based on the sub-project information and the separation rules to obtain the sub-project, the method further includes:
[0091] Step S1231: Conduct engineering tests on the sub-project to determine the function coverage information, interface interaction information, and stability information of the sub-project;
[0092] Step S1232: Construct a first test matrix based on the function coverage information, interface interaction information, and stability information, and construct a second test matrix according to the sub-project information;
[0093] Step S1233: Calculate the correlation value between the first test matrix and the second test matrix. When the correlation value meets the preset conditions, determine that the sub-project is normal; otherwise, determine that the sub-project is abnormal.
[0094] In this embodiment, the engineering test is to determine whether each sub-project is running normally. Among them, the function coverage information refers to a detailed record of the test coverage of software modules or system function points in software development and testing. It is used to evaluate the integrity of the test and ensure that all function points have been fully verified; similarly, the interface interaction information refers to a detailed record of the communication and interaction between modules or systems through interfaces. It is used to evaluate the correctness, integrity, and performance of the interfaces and ensure that the data exchange and collaborative work between modules comply with the design specifications; the stability information refers to a set of data and indicators used to evaluate the stability and reliability of a system or module under various operating conditions. The stability information usually covers the performance of the system under normal operation, high load, abnormal conditions, and long-term operation.
[0095] Specifically, the function coverage information usually includes the following aspects:
[0096] 1. Function point description
[0097] Function name: The specific name or identifier of each function point.
[0098] Function Description: A detailed description of the function point, including the input, processing logic, and output of the function.
[0099] Function Path: The call path or process of the function in the system. For example, which operations can the user perform to trigger this function.
[0100] 2. Test Case Coverage
[0101] Test Case Number: The unique identifier for each test case.
[0102] Test Case Description: The specific content of the test case, including input conditions, expected output, and test steps.
[0103] Coverage Type:
[0104] Statement Coverage: Whether all executable statements in the code are covered.
[0105] Branch Coverage: Whether all branch paths in the code are covered (such as if-else, switch-case, etc.).
[0106] Condition Coverage: Whether all possible values of the conditional expressions are covered.
[0107] Path Coverage: Whether all possible paths in the code are covered.
[0108] Interface interaction information usually includes the following aspects:
[0109] 1. Interface Basic Information
[0110] Interface Name: The unique identifier of the interface, such as getUserData, sendEmail, etc.
[0111] Interface Type: The type of the interface, such as RESTful API, SOAP, TCP / IP, WebSocket, etc.
[0112] Interface Path: The access path or address of the interface, such as / api / user.
[0113] Interface Version: The version number of the interface, used to distinguish different versions of the interface.
[0114] Module Belonging: The module or subsystem to which the interface belongs, such as the user management module, data processing module.
[0115] 2. Interface Input Information
[0116] Input Parameters: The parameters that need to be provided when calling the interface, including parameter name, type, whether it is required, etc.
[0117] Request body format: For POST or PUT requests, record the format (such as JSON, XML) and specific structure of the request body.
[0118] Request header information: Information contained in the request header, such as Content-Type, Authorization, etc.
[0119] 3. Interface output information
[0120] Return value: The data returned by the interface, including the type, structure, and possible value range of the return value.
[0121] Return status code: The status code returned by the interface, such as HTTP status codes (200, 404, 500, etc.).
[0122] Return message format: The format (such as JSON, XML) and specific structure of the return message.
[0123] Response header information: Information contained in the response header, such as Content-Type, Cache-Control, etc.
[0124] 4. Interface interaction process
[0125] Call chain: Record the call chain of the interface, including the caller and the callee.
[0126] Call frequency: The call frequency of the interface, such as the number of calls per second.
[0127] Call order: The order of interface calls, especially for business processes that depend on multiple interfaces.
[0128] Interaction sequence diagram: Use a sequence diagram to describe the call order and interaction process of the interface.
[0129] 5. Interface performance information
[0130] Response time: The response time of the interface, usually in milliseconds.
[0131] Throughput: The throughput of the interface, such as the number of requests processed per second.
[0132] Resource occupancy: The system resource occupancy situation during the operation of the interface, such as CPU usage, memory occupancy, etc.
[0133] Concurrent capacity: The maximum number of concurrent connections supported by the interface.
[0134] 6. Interface exception information
[0135] Exception types: The types of exceptions that the interface may throw, such as TimeoutException, IOException, etc.
[0136] Exception handling mechanism: The exception handling mechanism of the interface, such as retry mechanism, degradation strategy, etc.
[0137] Error codes: The error codes returned by the interface and their meanings.
[0138] Exception logs: Record the exception logs that occur during the operation of the interface, including the exception time, exception description, etc.
[0139] 7. Interface Dependencies
[0140] Dependent interfaces: Other interfaces that the current interface depends on.
[0141] Interfaces being depended on: Other interfaces that depend on the current interface.
[0142] Dependency status: The call status of the dependent interface, such as whether it is successful, whether it times out, etc.
[0143] 8. Test Coverage of Interface Interaction
[0144] Test case number: The unique identifier for each test case.
[0145] Test case description: The specific content of the test case, including input conditions, expected outputs, and test steps.
[0146] Test result: The execution result of the test case, usually "passed" or "failed".
[0147] Test coverage rate: The coverage rate of interface testing, such as whether it covers the boundary cases of all input parameters.
[0148] Example 3
[0149] The difference from Example 2 is that for the first matrix, it can be constructed according to the following table:
[0150] Table 1
[0151]
[0152] For the first matrix, it can be constructed according to the following table:
[0153] Table 2
[0154]
[0155] Subsequently, matrix H (corresponding to Table 1) and matrix P (corresponding to Table 2) are obtained respectively, and then the correlation value T is calculated according to the following formula:
[0156] (Formula 2)
[0157] It should be noted that the stability S of the system can be calculated by the following formula:
[0158] (Formula 3)
[0159] In the formula, R is the multiplexing degree, P is the number of general protocols, I is the number of interfaces, and M is the mechanism dependency value; among them, represents the positive impact of the multiplexing and standardization degree of the system on stability, represents the negative impact of the complexity of the system and the degree of dependence on external conditions on stability.
[0160] An embodiment of the present invention also provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0161] In an exemplary embodiment, the above computer-readable storage medium may include but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk or optical disc, etc., all kinds of media that can store computer programs.
[0162] An embodiment of the present invention also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0163] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, where the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0164] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0165] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.
[0166] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0167] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0168] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of this application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0169] The above content is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A separable project development method, characterized in that Including: Obtain project information, where the project information includes the project information of the target project to be processed; Perform project splitting on the target project according to a preset separation rule to obtain a number of sub-projects; Connect the sub-projects to a preset first APP through a preset communication protocol, and perform data interaction with the sub-projects through the first APP; Among them, the performing project splitting on the target project according to a preset separation rule to obtain a number of sub-projects includes: Perform project analysis on the target project to obtain the project information, where the project information includes at least any one of engineering reuse degree, project interface quantity, general protocol quantity, mechanism dependency value. The engineering reuse degree is the proportion of reusable resources in the target project in the target project; the mechanism dependency value is the complexity of the dependency relationship between modules in the target project; Perform requirement matching processing according to the project information to determine sub-project information, where the sub-project information includes at least any one of engineering boundaries and engineering functions. The engineering boundary includes at least any one of the function scope, call rules, and available interfaces of the sub-project; Perform independent project construction processing on the engineering objects in the target project based on the sub-project information and the separation rule to obtain the sub-projects; Among them, the engineering reuse degree is achieved through the following formula: Wherein, R is the engineering reuse degree, n is the number of factors to be considered for the engineering reuse degree, wi is the weight of the i-th factor, indicating the importance of this factor in the reuse degree evaluation; si is the score of the i-th factor, indicating the performance of the system in this factor; d i is the dependency degree of the i-th factor, indicating the degree of dependence of the module on a specific external environment; among them, the factor wi includes generality, independence, interface standardization degree, scalability, historical reuse situation, and user requirements; Among them, after performing independent project construction processing on the engineering objects in the target project based on the sub-project information and the separation rule to obtain the sub-projects, the method further includes: Perform engineering testing on the sub-projects to determine the function coverage information, interface interaction information, and stability information of the sub-projects; Construct a first test matrix based on the function coverage information, interface interaction information, and stability information, and construct a second test matrix according to the sub-project information; Calculate the correlation value between the first test matrix and the second test matrix. When the correlation value meets the preset conditions, determine that the sub-project is normal, otherwise determine that the sub-project is abnormal; The stability information is calculated based on the following formula: In the formula, R is the reuse degree, P is the general protocol quantity, I is the interface quantity, and M is the mechanism dependency value.
2. The method according to claim 1, wherein The performing data interaction with the sub-projects through the first APP includes: Obtain an interaction instruction; Parse the interaction instruction through the first APP to obtain interaction information, where the interaction information includes interaction object information and interaction action information. Among them, the interaction object includes the sub-project; Send the interaction action information to the interaction object according to the interaction object information to instruct the interaction object to perform an interaction action according to the interaction action information.
3. The method according to claim 1, characterized in that, The communication protocol includes at least the Socket communication protocol.
4. A separable project development system, characterized in that, Including: A project information collection module, used to obtain project information, where the project information includes the project information of the target project to be processed; A project splitting module, used to perform project splitting on the target project according to a preset separation rule to obtain a number of sub-projects; An interaction module for connecting the sub-project to a preset first APP through a preset communication protocol and performing data interaction with the sub-project through the first APP; Among them, the splitting of the target project according to a preset separation rule to obtain a number of sub-projects includes: Performing project analysis on the target project to obtain the project information, where the project information includes at least any one of project reuse degree, project interface quantity, general protocol quantity, and mechanism dependency value; the project reuse degree is the proportion of reusable resources in the target project in the target project; the mechanism dependency value is the complexity of the dependency relationship between modules in the target project; Performing requirement matching processing according to the project information to determine sub-project information, where the sub-project information includes at least any one of project boundaries and project functions; the project boundary includes at least any one of the function scope, call rules, and available interfaces of the sub-project; Performing independent project construction processing on the project objects in the target project based on the sub-project information and the separation rule to obtain the sub-project; Among them, the project reuse degree is achieved through the following formula: Wherein, R is the engineering reuse degree, n is the number of factors to be considered for the engineering reuse degree, wi is the weight of the i-th factor, indicating the importance of this factor in the reuse degree evaluation; si is the score of the i-th factor, indicating the performance of the system in this factor; d i is the dependence degree of the i-th factor, indicating the dependence degree of the module on a specific external environment; among them, the factor wi includes generality, independence, interface standardization degree, scalability, historical reuse situation, and user requirements; Among them, after performing independent project construction processing on the project objects in the target project based on the sub-project information and the separation rule to obtain the sub-project, the method further includes: Performing project testing on the sub-project to determine the function coverage information, interface interaction information, and stability information of the sub-project; Constructing a first test matrix based on the function coverage information, interface interaction information, and stability information, and constructing a second test matrix according to the sub-project information; Calculating the correlation value between the first test matrix and the second test matrix, and determining that the sub-project is normal when the correlation value meets the preset conditions, otherwise determining that the sub-project is abnormal; The stability information is calculated based on the following formula: In the formula, R is the reuse degree, P is the general protocol quantity, I is the interface quantity, and M is the mechanism dependency value.
5. The system according to claim 4, wherein The data interaction with the sub-project through the first APP includes: Obtaining an interaction instruction; Parsing the interaction instruction through the first APP to obtain interaction information, where the interaction information includes interaction object information and interaction action information, and the interaction object includes the sub-project; Sending the interaction action information to the interaction object according to the interaction object information to instruct the interaction object to perform an interaction action according to the interaction action information.
6. The system according to claim 4, characterized in that, The communication protocol includes at least the Socket communication protocol.
7. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, where the computer program is set to execute the method described in any one of claims 1 to 3 when running.
8. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is set to run the computer program to execute the method described in any one of claims 1 to 3.
Citation Information
Patent Citations
Micro-service architecture generation method and device, equipment and storage medium
CN118245056A