Method and apparatus for generating business code framework

By generating a business code framework in the business line construction system, the problems of IDE uniformity, middleware configuration uniformity and basic code reusability in the development team are solved, and efficient business code development and production efficiency are achieved.

CN111258572BActive Publication Date: 2025-06-13BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201811457524.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-11-30
Publication Date
2025-06-13
Estimated Expiration
2038-11-30

AI Technical Summary

Technical Problem

In the existing technology, the IDE used by the development team can only be unified by documents. The middleware configuration items lack unified management and the basic code is not unified, which leads to difficulty in reusing codes and strong mobility of team personnel, which leads to developers not familiar with business-related configurations and a lot of consultations.

Method used

By determining the business line to which the business to be developed belongs, finding the corresponding basic configuration, obtaining the configuration data and original basic code of the basic configuration, generating the code framework for the business to be developed in the customized business line construction system, unifying the middleware and business-related configurations, ensuring code consistency and reusability.

Benefits of technology

This greatly improves productivity, reduces the configuration time of developers, and ensures the unity and reusability of the business code framework.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111258572B_ABST
    Figure CN111258572B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and apparatus for generating a business code framework, relating to the field of computer technology. A specific embodiment of the method includes: determining the business line to which the business to be developed belongs, and searching for the corresponding basic configuration of the business to be developed in the basic configuration of the business line; obtaining the configuration data and the original basic code of the basic configuration in a custom business line construction system; and generating a code framework for the business to be developed according to the configuration data and the original basic code. This embodiment can classify different businesses by using business lines, search for the corresponding basic configuration of the business through the business line to which the business belongs, and then generate a code framework for the business by means of the configuration data and the original basic code of the basic configuration, so that business developers can generate a business code framework by selecting a business line and a business basic configuration, greatly improving production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular, to a method and apparatus for generating a business code framework. Background Art

[0002] In today's society, with the continuous development of business, software systems have become increasingly complex, and the knowledge, content, and problems involved in different fields of business are extremely numerous. If developed from scratch every time, it would be a very time-consuming task and not necessarily done well. Therefore, after a business project is established, if developers use the computer programming language Java for development, they need to build an original business code development framework.

[0003] Currently, the functions that the business needs to implement are relatively complex, and the business is developed through collaboration among development teams. Without a unified standard, everyone writes their own code. The available integrated development environments (IDEs) for development are: Eclipse (i.e., an open-source, Java-based extensible development platform), IntelliJ IDEA (i.e., an integrated environment developed based on the Java programming language), etc. Taking IntelliJ IDEA as an example, one can choose a Spring MVC project or a Spring Web Services project to build a basic code framework for development. After having the basic code framework, then make selections for middleware configuration items, basic code of middleware, and business-related configurations, and then generate a business code framework.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: First, the IDEs used by development teams can only be specified and unified through documents; second, there is no unified management of middleware configuration items, and adjusting configurations consumes a large amount of time; third, the basic code is not unified, and the code is difficult to reuse; fourth, the personnel flow in the team is relatively strong, resulting in a large number of consultations due to developers' unfamiliarity with business-related configurations or the company's unique related configurations. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a method and apparatus for generating a business code framework, which can enable business developers to generate a business code framework by selecting a business line and basic business configurations, greatly improving production efficiency.

[0006] To achieve the above object, according to the first aspect of the embodiments of the present invention, a method for generating a business code framework is provided.

[0007] A method for generating a business code framework according to an embodiment of the present invention includes: determining the business line to which the business to be developed belongs, and searching for the corresponding basic configuration of the business to be developed in the basic configuration of the business line; in a custom business line construction system, obtaining the configuration data and the original basic code of the basic configuration; generating the code framework of the business to be developed according to the configuration data and the original basic code.

[0008] Optionally, before obtaining the configuration data and the original basic code of the basic configuration in a custom business line construction system, the method further includes: creating the business line in the custom business line construction system; setting the development platform of the business line, and determining at least one basic configuration of the business line; for one of the at least one basic configurations, presetting the configuration data of the one basic configuration in the configuration environment; generating the original basic code of the one basic configuration according to the development platform and the configuration data.

[0009] Optionally, the configuration environment includes at least one of the following options: development environment, test environment, and online environment; and the configuration data includes at least one of the following options: middleware configuration data and business-related configuration data.

[0010] Optionally, the generating the code framework of the business to be developed according to the configuration data and the original basic code includes: constructing the target path of the business to be developed; copying the original basic code to the target path, and replacing the unique identifier of the basic configuration in the copied original code with the unique identifier of the business to be developed to generate the basic code of the business to be developed; storing the configuration data in the target path of the business to be developed; compressing and packaging the folder corresponding to the target path to generate the download link of the business to be developed.

[0011] To achieve the above object, according to the second aspect of the embodiments of the present invention, there is provided an apparatus for generating a business code framework.

[0012] An apparatus for generating a business code framework according to an embodiment of the present invention includes: a determination module, configured to determine the business line to which the business to be developed belongs, and search for the corresponding basic configuration of the business to be developed in the basic configuration of the business line; an acquisition module, configured to obtain the configuration data and the original basic code of the basic configuration in a custom business line construction system; a generation module, configured to construct the code framework of the business to be developed according to the configuration data and the original basic code.

[0013] Optionally, the obtaining module is further configured to: create the business line in a customized business line construction system; set the development platform of the business line and determine at least one basic configuration of the business line; for one basic configuration among the at least one basic configuration, preset the configuration data of the one basic configuration in a configuration environment; and generate the original basic code of the one basic configuration according to the development platform and the configuration data.

[0014] Optionally, the configuration environment includes at least one of the following options: a development environment, a test environment, and a production environment; and the configuration data includes at least one of the following options: middleware configuration data and business-related configuration data.

[0015] Optionally, the generating module is further configured to: construct the target path of the to-be-developed business; copy the original basic code to the target path, and replace the unique identifier of the basic configuration in the copied original code with the unique identifier of the to-be-developed business to generate the basic code of the to-be-developed business; store the configuration data in the target path of the to-be-developed business; and compress and package the folder corresponding to the target path to generate the download link of the to-be-developed business.

[0016] To achieve the above object, according to a third aspect of the embodiments of the present invention, an electronic device is provided.

[0017] An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method for generating a business code framework according to an embodiment of the present invention.

[0018] To achieve the above object, according to a fourth aspect of the embodiments of the present invention, a computer-readable medium is provided.

[0019] A computer-readable medium according to an embodiment of the present invention has a computer program stored thereon, and when the program is executed by a processor, the method for generating a business code framework according to an embodiment of the present invention is implemented.

[0020] One embodiment of the above invention has the following advantages or beneficial effects: Different services can be classified using service lines. By means of the service lines to which the services belong, the corresponding basic configurations of the services can be found. Then, with the configuration data and original basic code of the basic configurations, a code framework for the services can be generated. As a result, business developers can generate a business code framework by selecting service lines and business basic configurations, greatly improving production efficiency. In the custom service line construction system of the embodiment of the present invention, the basic configurations of the service lines are preset, the configuration data of each basic configuration are preset, and the original basic code of each basic configuration is stored. Thus, after the basic configuration of the service to be developed is determined, the configuration data and original basic code can be directly called from the custom service line construction system. In the embodiment of the present invention, the configuration data may include middleware configuration data and service-related configuration data, so that the middleware configuration and service-related configuration can be unified, avoiding repeated adjustment of the configuration, saving a large amount of time, and ensuring the consistency and reusability of the basic code. In the embodiment of the present invention, according to the original basic code of the configuration data, the configuration data and business basic code of the service to be developed are determined, and then the folder of the service to be developed is compressed and packaged to generate a download link, so that it can be downloaded and used by developers, ensuring the unity of the business code framework, reducing the configuration time of developers, and improving production efficiency.

[0021] The further effects of the above non-conventional optional methods will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings are used to better understand the present invention and do not constitute an improper limitation to the present invention. Among them:

[0023] Figure 1 is a schematic diagram of the main steps of the method for generating a business code framework according to an embodiment of the present invention;

[0024] Figure 2 is a schematic diagram of middleware configuration and service-related configuration according to an embodiment of the present invention;

[0025] Figure 3 is a schematic diagram of the interface for generating the basic code of the service to be developed according to an embodiment of the present invention;

[0026] Figure 4 is a schematic diagram of the system architecture for generating a business code framework according to the present invention;

[0027] Figure 5 is a schematic diagram of the main modules of the device for generating a business code framework according to an embodiment of the present invention;

[0028] Figure 6 is an exemplary system architecture diagram to which the embodiment of the present invention can be applied;

[0029] Figure 7 It is a schematic structural diagram of a computer system of a terminal device or a server suitable for implementing the embodiments of the present invention. Detailed implementation manners

[0030] The following describes exemplary embodiments of the present invention with reference to the accompanying drawings. Various details of the embodiments of the present invention are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, descriptions of well-known functions and structures are omitted below for clarity and conciseness.

[0031] Figure 1 It is a schematic diagram of the main steps of a method for generating a business code framework according to an embodiment of the present invention. As a reference embodiment of the present invention, as Figure 1 shown, the main steps of the method for generating a business code framework according to an embodiment of the present invention may include:

[0032] Step S101: Determine the business line to which the business to be developed belongs, and in the basic configuration of the business line, search for the basic configuration corresponding to the business to be developed.

[0033] In the present invention, business lines are used to classify different businesses. For example, departments are divided into a stream computing business line, a data factory business line, etc. Under the stream computing business line, there are columnar storage services, unified log services, etc. Business lines are only used to divide businesses. For the same business line, there are specific groups of common basic configurations. For example, for the data cloud business line, it includes: basic configurations for internal customers, basic configurations for external privatized customers, and basic configurations for public cloud customers. In step S101, first determine the business to be developed, that is, the business that has been approved for project establishment, which business line it belongs to, and then in the basic configuration of the determined business line, search for the basic configuration corresponding to the business to be developed, that is, search for which basic configuration scenario the business to be developed belongs to.

[0034] Step S102: In the custom business line construction system, obtain the configuration data and original basic code of the basic configuration.

[0035] In the present invention, the custom business line construction system is equivalent to a specific management tool for business lines, which can perform functions such as adding, deleting, modifying, and querying business lines. For example, as the business continues to grow, business lines can be added to the custom business line construction system according to the actual situation; when all businesses of a certain type are taken off the line, the business lines to which the businesses of that type belong can be deleted from the custom business line construction system; or, in order to subdivide the business, the original business lines can be modified; of course, a query function for business lines can also be provided. In the present invention, business lines are equivalent to first-level classifications, and basic configurations are equivalent to second-level classifications. In the case of a large number and complexity of businesses, simply classifying businesses using business lines is likely to result in the disadvantage of an overly large grouping range and lack of refinement. Therefore, for each business line, different basic configurations of that business line are set in the custom business line construction system. Since the present invention has pre-set specific situations of different basic configurations in the custom business line construction system, the configuration data and original basic code of the basic configuration can be directly queried in this system.

[0036] As mentioned above, the present invention has pre-set specific situations of different basic configurations in the custom business line construction system, and its specific implementation method may include: creating a business line in the custom business line construction system; setting the development platform of the business line and determining at least one basic configuration of the business line; for one of the at least one basic configurations, presetting the configuration data of a basic configuration in the configuration environment; and generating the original basic code of a basic configuration according to the development platform and the configuration data.

[0037] First, it is necessary to create a business line in the custom business line construction system and set the development platform of this business line, that is, the development and integration environment corresponding to this business line. Each business line will include multiple basic configurations. For example, the data cloud business line has three basic configurations for large customers, small customers, and internal customers. For each basic configuration, it is necessary to pre-set the configuration data of this basic configuration in different environments in the system. In the embodiments of the present invention, different environments may include: development environment, test environment, and online environment. Among them, the development environment is the environment when developers develop the business; the test environment is equivalent to the pre-release environment, and before the business goes online, it is necessary to test the business; the online environment refers to the environment where users use the business. For example, if the business is for large customers, then the online environment is the environment where large customers use this business.

[0038] Different environments have different configuration data. The configuration data in the present invention may include: middleware configuration data and business-related configuration data. For example, product ABC will all connect to database D and also access a service such as a user center. Here, the configuration for connecting to database D is middleware configuration, and the configuration for connecting to and accessing the user center is business-related configuration. Among them, the direct database connection middleware, cache middleware, and queue middleware can be regarded as middleware configuration. Therefore, the format of middleware configuration is generally fixed. Other connections to various business services, such as user centers, advertising services, login services, encryption and decryption services, etc., are business-related configurations. Since the forms of various business services are not unified, there are business parameter settings, settings of software development toolkits for connecting software application programs, etc. Therefore, the format of business-related configuration is set according to the actual situation. To sum up, the basic form of a development environment configuration, a test environment configuration, or an online environment configuration includes two parts: middleware configuration and business-related configuration. Figure 2 It is a schematic diagram of middleware configuration and business-related configuration according to an embodiment of the present invention.

[0039] In the present invention, after setting the configuration data of the basic configuration, at the same time, a development platform for the business line is also set in the custom business line construction system. Therefore, in the present invention, the original basic code of the basic configuration can be pre-generated directly according to the development platform and the configuration data.

[0040] Step S103: Generate a code framework for the business to be developed according to the configuration data and the original basic code.

[0041] In the present invention, the code framework of the business to be developed is equivalent to templatized code, that is, the basic code of the business to be developed, which can implement many basic functions. The elements required to generate the basic code of the business to be developed in the present invention may include: the selected business line, the selected basic configuration to be used, the Chinese name of the business, the English name of the business, and the middleware configuration and business-related configuration in different environments. Among them, the basic configuration under each business line is a specific set of several groups. Each basic configuration has a development environment configuration, a test environment configuration, and an online environment configuration, corresponding to the Dev configuration item, the Pre configuration item, and the Prod configuration item respectively. The Chinese name of the business is used to describe the name of the business project product. Considering that the development platform only supports projects with English names, when generating the code framework, it needs to be packaged into a folder with an English name, and the content related to the project needs to use this English name of the project. Figure 3 It is a schematic diagram of the interface for generating the basic code of the business to be developed according to an embodiment of the present invention. In Figure 3 it, the business line is the data cloud, and the selected basic configuration (that is, Figure 3 the selected configuration group used in Figure 3The Chinese name of the item in it is "Test", and the English name of the service (i.e., Figure 3 the English name of the item in it) is "text". Figure 3 In it, the database is used and Redis is used for middleware configuration, and other configurations are used for service-related configurations. For different middleware configurations and service-related configurations, it is necessary to set configurations under different environment configuration items (Dev configuration item, Pre configuration item, and Prod configuration item).

[0042] As another reference embodiment of the present invention, the above step S103 generates a code framework for the service to be developed according to the configuration data and the original basic code, which may specifically include: constructing the target path of the service to be developed; copying the original basic code to the target path, and replacing the unique identifier of the basic configuration in the copied original code with the unique identifier of the service to be developed to generate the basic code of the service to be developed; storing the configuration data in the target path of the service to be developed; compressing and packaging the folder corresponding to the target path to generate a download link for the service to be developed.

[0043] In the present invention, the original basic code of the basic configuration of each service line is pre-generated, and the original basic code contains the middleware connection code used, the software development kit dedicated to the service line, and the software development kit integration code. The original basic code is grouped into projects with specific names, which can be stipulated as the baseweb project and stored in a specific path, for example, service line / baseweb. When a user creates a new service, first construct the target path, which can be stipulated as: dest / service line / Chinese name of the new service / English name of the new service. Then, copy the original basic code corresponding to the basic configuration of the service line to the target path. Next, adjust the file name of the copied code according to the new English name of the service. For example, baseweb.imi needs to be adjusted to the new English name of the service.imi, and adjust the content related to the service name in the service. It is also necessary to store the configuration data of the selected basic configuration in the new service. Finally, compress and package the generated new service for developers to download and use.

[0044] Figure 4 is a schematic diagram of the system architecture for generating a service code framework according to the present invention. As Figure 4 shown, the system architecture for generating a service code framework of the present invention mainly includes the following three parts: a custom service line construction system, a search system for configuration data and original basic code, and a code framework generation system.

[0045] Among them, the customized business line construction system is the main and important part of the present invention and is used to store information of business lines. In the customized business line construction system, business lines are created, and the development platforms for each business line are set. In the customized business line construction system, the basic configuration information included in the business lines is also stored. For each basic configuration, the middleware configuration data and business-related configuration data of the basic configuration are preset, and the original basic code of the basic configuration is stored.

[0046] The lookup system for configuration data and original basic code is used to determine which business line the business to be developed belongs to, and is used to find the basic configuration related to the business to be developed in the basic configuration of the business line, and then the configuration data and original basic code corresponding to the basic configuration can be obtained in the customized business line construction system.

[0047] The code framework generation system is used to generate the code of the business to be developed according to the distribution data and the original basic code, and generate the code framework of the business to be developed in combination with the distribution data. It has been specifically explained in step S103 and will not be repeated here.

[0048] According to the technical solution for generating a business code framework of the present invention, different businesses can be classified by using business lines. Through the business line to which the business belongs, the basic configuration corresponding to the business is found, and then the code framework of the business is generated by means of the configuration data and the original basic code of the basic configuration, so that business developers can generate a business code framework by selecting a business line and a business basic configuration, greatly improving production efficiency. In the embodiment of the present invention, in the customized business line construction system, the basic configuration of the business line is preset, the configuration data of each basic configuration is preset, and the original basic code of each basic configuration is stored, so that after the basic configuration of the business to be developed is determined, the configuration data and the original basic code can be directly called from the customized business line construction system. In the embodiment of the present invention, the configuration data may include middleware configuration data and business-related configuration data, so that the middleware configuration and business-related configuration can be unified, avoiding repeated adjustment of the configuration, saving a large amount of time, and ensuring the consistency and reusability of the basic code. In the embodiment of the present invention, according to the original basic code of the configuration data, the configuration data and the business basic code of the business to be developed are determined, and then the folder of the business to be developed is compressed and packaged to generate a download link, so that it can be downloaded and used by developers, ensuring the unity of the code framework of the business, reducing the configuration time of developers, and improving production efficiency.

[0049] Figure 5 It is a schematic diagram of the main modules of the device for generating a business code framework according to an embodiment of the present invention. As Figure 5As shown in the figure, the apparatus 500 for generating a business code framework according to an embodiment of the present invention mainly includes the following modules: a determination module 501, an acquisition module 502, and a generation module 503. Among them,

[0050] The determination module 501 can be used to: determine the business line to which the business to be developed belongs, and find the corresponding basic configuration of the business to be developed in the basic configuration of the business line;

[0051] The acquisition module 502 can be used to: obtain the configuration data and the original basic code of the basic configuration in a custom business line construction system;

[0052] The generation module 503 can be used to: construct the code framework of the business to be developed according to the configuration data and the original basic code.

[0053] The apparatus for generating a business code framework according to an embodiment of the present invention can classify different businesses by using business lines, find the corresponding basic configuration of the business through the business line to which the business belongs, and then generate the code framework of the business by means of the configuration data and the original basic code of the basic configuration, so that business developers can generate the business code framework by selecting the business line and the business basic configuration, greatly improving the production efficiency.

[0054] In an embodiment of the present invention, the acquisition module 502 can also be used to: create a business line in a custom business line construction system; set the development platform of the business line, and determine at least one basic configuration of the business line; for one of the at least one basic configuration, preset the configuration data of a basic configuration in the configuration environment; generate the original basic code of a basic configuration according to the development platform and the configuration data. In an embodiment of the present invention, in a custom business line construction system, the basic configuration of the business line is preset, the configuration data of each basic configuration is preset, and the original basic code of each basic configuration is stored, so that after the basic configuration of the business to be developed is determined, the configuration data and the original basic code can be directly called from the custom business line construction system.

[0055] In an embodiment of the present invention, the configuration environment may include at least one of the following options: a development environment, a test environment, and an online environment; and the configuration data may include at least one of the following options: middleware configuration data and business-related configuration data. In an embodiment of the present invention, the configuration data may include middleware configuration data and business-related configuration data, so that the middleware configuration and the business-related configuration can be unified, avoiding repeated adjustment of the configuration and saving a lot of time; in an embodiment of the present invention, the original basic code may include middleware connection code and business-related software development kit integration code, and can also ensure the consistency and reusability of the code.

[0056] In an embodiment of the present invention, the generation module 503 may further be configured to: construct a target path for the business to be developed; copy the original basic code to the target path, and replace the unique identifier of the basic configuration in the copied original code with the unique identifier of the business to be developed, so as to generate the basic code of the business to be developed; store the configuration data in the target path of the business to be developed; compress and package the folder corresponding to the target path to generate a download link for the business to be developed. In the embodiment of the present invention, according to the original basic code of the configuration data, the configuration data and the business basic code of the business to be developed are determined, and then the folder of the business to be developed is compressed and packaged to generate a download link, so that it can be downloaded and used by developers, ensuring the unity of the code framework of the business, reducing the configuration time of developers, and improving production efficiency.

[0057] Figure 6 FIG. 600 shows an exemplary system architecture to which the method for generating a business code framework or the apparatus for generating a business code framework according to the embodiments of the present invention can be applied.

[0058] As Figure 6 shown, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605 (this architecture is merely an example, and the components included in the specific architecture may be adjusted according to the specific situation of the application). The network 604 is used to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0059] Users may use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 601, 602, 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0060] The terminal devices 601, 602, 603 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.

[0061] The server 605 may be a server providing various services, such as a background management server that supports the shopping websites browsed by users using the terminal devices 601, 602, 603 (only as an example). The background management server may analyze and process data such as product information query requests received, and feedback the processing results (such as target push information, product information - only as examples) to the terminal devices.

[0062] It should be noted that the method for generating a service code framework provided by the embodiments of the present invention is generally executed by the server 605. Correspondingly, the apparatus for generating a service code framework is generally disposed in the server 605.

[0063] It should be understood that Figure 6 the number of terminal devices, networks, and servers in

[0064] The following refers to Figure 7 FIG. 700, which shows a schematic structural diagram of a computer system 700 of a terminal device suitable for implementing the embodiments of the present invention. Figure 7 The terminal device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.

[0065] As Figure 7 shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0066] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as required. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as required, so that a computer program read from it can be installed into the storage section 708 as required.

[0067] In particular, according to the embodiments disclosed in the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present invention include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above functions defined in the system of the present invention are executed.

[0068] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. In the present invention, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.

[0069] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0070] The modules described in the embodiments of the present invention can be implemented in software or in hardware. The described modules can also be provided in a processor. For example, it can be described as: a processor includes a determination module, an acquisition module, and a generation module. Among them, the names of these modules do not constitute a limitation on the module itself in some cases. For example, the determination module can also be described as "a module that determines the business line to which the business to be developed belongs and searches for the corresponding basic configuration of the business to be developed in the basic configuration of the business line".

[0071] As another aspect, the present invention also provides a computer-readable medium, which can be included in the device described in the above embodiments; or can exist separately without being assembled into the device. The above computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the device includes: determining the business line to which the business to be developed belongs and searching for the corresponding basic configuration of the business to be developed in the basic configuration of the business line; obtaining the configuration data and the original basic code of the basic configuration in the custom business line construction system; generating a code framework for the business to be developed according to the configuration data and the original basic code.

[0072] According to the technical solution of the embodiment of the present invention, different services can be classified by service lines. By the service line to which the service belongs, the corresponding basic configuration of the service can be found. Then, with the configuration data and the original basic code of the basic configuration, a code framework for the service can be generated. Thus, service developers can generate a service code framework by selecting the service line and the service basic configuration, greatly improving production efficiency. In the custom service line construction system of the embodiment of the present invention, the basic configuration of the service line is preset, and the configuration data of each basic configuration is preset, and the original basic code of each basic configuration is stored. Thus, after the basic configuration of the service to be developed is determined, the configuration data and the original basic code can be directly called from the custom service line construction system. In the embodiment of the present invention, the configuration data may include middleware configuration data and service-related configuration data, so that the middleware configuration and the service-related configuration can be unified, avoiding repeated adjustment of the configuration, saving a lot of time, and ensuring the consistency and reusability of the basic code. In the embodiment of the present invention, according to the original basic code of the configuration data, the configuration data and the service basic code of the service to be developed are determined, and then the folder of the service to be developed is compressed and packaged to generate a download link, so that it can be downloaded and used by developers, ensuring the unity of the service code framework, reducing the configuration time of developers, and improving production efficiency.

[0073] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for generating a business code framework, characterized in that, comprising: In a custom business line construction system, create the business line; Set the development platform of the business line and determine at least one basic configuration of the business line; For one of the at least one basic configurations, preset the configuration data of the one basic configuration in the configuration environment; Generate the original basic code of the one basic configuration according to the development platform and the configuration data; Determine the business line to which the business to be developed belongs, and in the basic configuration of the business line, search for the basic configuration corresponding to the business to be developed; In a custom business line construction system, obtain the configuration data and the original basic code of the basic configuration; Generate the code framework of the business to be developed according to the configuration data and the original basic code.

2. The method according to claim 1, characterized in that, The configuration environment includes at least one of the following options: development environment, test environment, and online environment; and The configuration data includes at least one of the following options: middleware configuration data and business-related configuration data.

3. The method according to claim 1, characterized in that, The generating the code framework of the business to be developed according to the configuration data and the original basic code includes: Construct the destination path of the business to be developed; Copy the original basic code to the destination path, and replace the unique identifier of the basic configuration in the copied original basic code with the unique identifier of the business to be developed to generate the basic code of the business to be developed; Store the configuration data in the destination path of the business to be developed; Compress and package the folder corresponding to the destination path to generate the download link of the business to be developed.

4. An apparatus for generating a business code framework, characterized in that, comprising: A determination module, configured to create the business line in a custom business line construction system; Set the development platform of the business line and determine at least one basic configuration of the business line; for one of the at least one basic configurations, preset the configuration data of the one basic configuration in the configuration environment; Generate the original basic code of the one basic configuration according to the development platform and the configuration data; Determine the business line to which the business to be developed belongs, and in the basic configuration of the business line, search for the basic configuration corresponding to the business to be developed; An acquisition module, configured to obtain the configuration data and the original basic code of the basic configuration in a custom business line construction system; A generation module, configured to generate the code framework of the business to be developed according to the configuration data and the original basic code.

5. The apparatus according to claim 4, characterized in that, The configuration environment includes at least one of the following options: development environment, test environment, and online environment; and The configuration data includes at least one of the following options: middleware configuration data and business-related configuration data.

6. The apparatus according to claim 4, characterized in that, The generation module is further configured to: Construct the destination path of the business to be developed; Copy the original base code to the target path, and replace the unique identifier of the base configuration in the copied original base code with the unique identifier of the business to be developed, so as to generate the base code of the business to be developed; Store the configuration data in the target path of the business to be developed; Compress and package the folder corresponding to the target path to generate a download link for the business to be developed.

7. An electronic device, characterized in that, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-3.

8. A computer-readable medium having a computer program stored thereon, characterized in that, the program, when executed by a processor, implements the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Skeleton code generation method and skeleton code generator

    CN106874019A