CN108920139B - Program generation method, device and system, electronic equipment and storage medium - Google Patents

Program generation method, device and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN108920139B
CN108920139B CN201810712583.9A CN201810712583A CN108920139B CN 108920139 B CN108920139 B CN 108920139B CN 201810712583 A CN201810712583 A CN 201810712583A CN 108920139 B CN108920139 B CN 108920139B
Authority
CN
China
Prior art keywords
information
program
service type
server
subtask
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810712583.9A
Other languages
Chinese (zh)
Other versions
CN108920139A (en
Inventor
杜楠
贾振通
李宏辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Software Co Ltd
Beijing Kingsoft Digital Entertainment Co Ltd
Original Assignee
Beijing Kingsoft Software Co Ltd
Beijing Kingsoft Digital Entertainment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Software Co Ltd, Beijing Kingsoft Digital Entertainment Co Ltd filed Critical Beijing Kingsoft Software Co Ltd
Priority to CN201810712583.9A priority Critical patent/CN108920139B/en
Publication of CN108920139A publication Critical patent/CN108920139A/en
Application granted granted Critical
Publication of CN108920139B publication Critical patent/CN108920139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention provides a program generation method, a device, a system, electronic equipment and a storage medium. According to the method and the device, after the development task information is obtained, the development task information is divided according to the preset division rule, so that manual division is avoided, the division period is shortened, developers can obtain the subtask information per se quickly, the time for the developers to start development is short, then codes compiled by the developers based on the subtask information are received, the program corresponding to the subtask information is generated, and the development period is shortened.

Description

Program generation method, device and system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of system development technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a storage medium for generating a program.
Background
The current software development generally requires a plurality of developers to collaborate together for development. Generally, one piece of software corresponds to one piece of development task information, before software development is carried out, a person who needs to know the technology manually plans the development task information corresponding to the software, and then subtask information obtained through planning is distributed to developers, wherein each developer has different subtask information.
The conventional program development life cycle generally relates to at least two environments, namely a test environment and a formal environment, after developers finish subtask information of the developers, the developers artificially copy finished codes to a packaging server to obtain the test environment, the packaged codes, namely primary versions, are tested by the testers, after repeated tests, the versions which are finally tested successfully are deployed in the formal environment, and the formal environment provides services for users.
In the related art, development task information is divided artificially, and the division period is longer due to the artificial division of the development task information, so that the time for a developer to obtain subtask information per se is longer, and the time for the developer to start development is later, therefore, the division period is longer, and the development period of software is further longer.
Disclosure of Invention
An object of embodiments of the present invention is to provide a program generation method, apparatus, system, electronic device, and storage medium, so as to shorten a development cycle. The specific technical scheme is as follows:
a program generation method applied to a code management server, the method comprising:
acquiring development task information;
dividing the development task information according to a preset division rule to obtain a plurality of subtask information;
and receiving a code written by a developer based on the subtask information, and generating a program corresponding to the subtask information.
Optionally, the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information includes:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
and dividing the development task information based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
Optionally, the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information includes:
determining a service type corresponding to the development task information;
and dividing the development task information based on the service type to obtain a plurality of subtask information.
Optionally, the step of dividing the development task information based on the service type to obtain a plurality of subtask information includes:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
Optionally, the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information includes:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
dividing the development task information based on the coding layers to obtain a plurality of target task information, wherein one coding layer corresponds to one target task information;
determining a service type corresponding to each target task information;
and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
Optionally, after the step of generating the program corresponding to the subtask information, the method further includes:
receiving a packing task instruction, determining a program to be packed contained in the packing task instruction from programs corresponding to the subtask information, and sending the program to be packed to a packing server, so that the packing server packs and deploys the program to be packed.
A program generating apparatus applied to a code management server, the apparatus comprising:
the acquisition module is used for acquiring development task information;
the dividing module is used for dividing the development task information according to a preset dividing rule to obtain a plurality of subtask information;
and the receiving module is used for receiving a code written by a developer based on the subtask information and generating a program corresponding to the subtask information.
Optionally, the dividing module includes:
a first preset coding architecture information obtaining unit, configured to obtain preset coding architecture information;
a first coding level determining unit, configured to determine a coding level included in the preset coding architecture information;
the first dividing unit is used for dividing the development task information based on the coding layers to obtain a plurality of subtask information, wherein one coding layer corresponds to one subtask information.
Optionally, the dividing module includes:
the first service type determining unit is used for determining the service type corresponding to the development task information;
and the second dividing unit is used for dividing the development task information based on the service type to obtain a plurality of subtask information.
Optionally, the second dividing unit is specifically configured to:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
Optionally, the dividing module includes:
a second preset coding architecture information obtaining unit, configured to obtain preset coding architecture information;
a second coding level determining unit, configured to determine a coding level included in the preset coding architecture information;
the third dividing unit is used for dividing the development task information based on the coding layers to obtain a plurality of target task information, wherein one coding layer corresponds to one target task information;
the second service type determining unit is used for determining the service type corresponding to each target task information;
and the fourth dividing unit is used for dividing each target task information based on the determined service type to obtain a plurality of subtask information.
Optionally, the apparatus further comprises:
and the instruction receiving module is used for receiving a packing task instruction after the program is generated, determining a program to be packed contained in the packing task instruction from the program corresponding to the subtask information, and sending the program to be packed to a packing server so that the packing server packs and deploys the program to be packed.
An electronic device comprising a processor and a memory;
a memory for storing a computer program;
a processor for implementing any of the above method steps when executing a program stored in the memory.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out any of the method steps.
A program packaging deployment system comprises a code management server and a packaging server;
the code management server is used for obtaining development task information, dividing the development task information according to a preset dividing rule to obtain a plurality of subtask information, receiving a code compiled by a developer based on the subtask information, generating a program corresponding to the subtask information, receiving a packing task instruction, determining a program to be packed contained in the packing task instruction from the program corresponding to the subtask information, and sending the program to be packed to the packing server;
and the packaging server is used for receiving the program to be packaged and packaging and deploying the program to be packaged.
Optionally, the code management server is specifically configured to:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
and dividing the development task information based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
Optionally, the code management server is specifically configured to:
determining a service type corresponding to the development task information;
and dividing the development task information based on the service type to obtain a plurality of subtask information.
Optionally, the code management server is specifically configured to:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
Optionally, the code management server is specifically configured to:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
dividing the development task information based on the coding levels to obtain a plurality of target task information, wherein one coding level corresponds to one target task information;
determining a service type corresponding to each target task information;
and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
Optionally, the system further comprises a test server;
the packaging server is specifically used for receiving the program to be packaged, packaging the code of the program to be packaged based on a preset packaging rule to obtain a program package to be tested, and deploying the program package to be tested to the test server;
the test server is used for receiving the program to be tested and testing the program to be tested.
Optionally, the packaging server is further configured to, after the to-be-tested package is deployed to a test server, receive a page file corresponding to the to-be-packaged task sent by the code management server, and deploy the page file to the test server;
the test server is also used for receiving the page file and testing the page file.
Optionally, the packaging server is specifically configured to determine a service type of the program to be packaged;
under the condition that the service type of the program to be packaged is a single service type, integrally packaging the codes of the program to be packaged to obtain a program package to be tested;
and when the service type of the program to be packaged is a multi-service type, wholly packaging the codes of the program to be packaged to obtain a target program package, unpacking the target program package based on the service type of the service included in the program to be packaged to obtain the program package to be tested, or unpacking the target program package based on the attribute information of the service included in the program to be packaged to obtain the program package to be tested.
Optionally, the packaging server is specifically configured to determine a service type of each service included in the program to be packaged, and split a code of a service of the same service type in the target program package into one program package to be tested.
Optionally, the packaging server is specifically configured to determine attribute information of services included in the program to be packaged, determine, based on the attribute information, a correlation between the services, and split a code of a service whose correlation is greater than a preset threshold in the target program package into one program package to be tested.
Optionally, a code library is also included;
the packaging server is further used for sending the codes of the programs to be packaged to the code base after the codes of the programs to be packaged corresponding to the tasks to be packaged are obtained;
and the code library is used for receiving the codes of the programs to be packaged and storing the codes of the programs to be packaged.
Optionally, the code management server is provided with a version management SVN system.
Optionally, there are a plurality of test servers;
the packaging server is specifically configured to determine a target function corresponding to the program to be packaged, determine a test server corresponding to the target function according to a preset corresponding relationship between functions and the test server, and deploy the program package to be tested to the test server corresponding to the target function.
Optionally, the test server includes a plurality of test server clusters;
the packaging server is specifically configured to determine a target function corresponding to the program package to be tested, determine a test server cluster corresponding to the target function according to a preset corresponding relationship between functions and the test server cluster, and deploy the program package to be tested to the test server cluster corresponding to the target function.
Optionally, the system further comprises a publishing server;
the test server is also used for deploying the program package which is tested successfully to the release server;
and the release server is used for receiving the successfully tested program package and carrying out production deployment on the successfully tested program package.
Optionally, the system further comprises a publishing server;
the packaging server is also used for sending the program packages to be tested to the issuing server after the program packages to be tested are obtained through packaging;
the issuing server is used for receiving the program packages to be tested and carrying out production deployment on the program packages to be tested.
In the implementation of the invention, the development task information is obtained, the development task information is divided according to the preset division rule to obtain a plurality of subtask information, and a code compiled by a developer based on the subtask information is received to generate a program corresponding to the subtask information. According to the method and the device, after the development task information is obtained, the development task information is divided according to the preset division rule, so that manual division is avoided, the division period is shortened, developers can obtain the subtask information per se quickly, the time for the developers to start development is short, then codes compiled by the developers based on the subtask information are received, the program corresponding to the subtask information is generated, and the development period is shortened.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a first method for generating a program according to an embodiment of the present invention;
fig. 2 is a schematic view of a first flow chart of dividing development task information according to a preset division rule to obtain multiple pieces of subtask information according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a second flow of dividing development task information according to a preset division rule to obtain multiple pieces of subtask information according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a third process of dividing development task information according to a preset division rule to obtain a plurality of pieces of subtask information according to the embodiment of the present invention;
fig. 5 is a schematic flowchart of a second program generation method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a program generating apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a program packaging deployment system according to an embodiment of the present invention.
Fig. 9 is a schematic diagram of packaging, testing, and production deployment performed by the program packaging deployment system according to the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems in the related art, embodiments of the present invention provide a program generation method, apparatus, system, electronic device, and storage medium.
It should be noted that the application scenario in the embodiment of the present invention includes a packaging server and a code management server.
The packaging server is mainly used for packaging the codes to be packaged and deploying the packaged program package to the test server; the code management server is mainly used for dividing development task information and managing codes written by developers; the test server is mainly used for testing the packaged program package.
First, a program generation method applied to a code management server according to the present invention will be described.
Fig. 1 is a schematic flowchart of a program generation method provided in an embodiment of the present invention, and is applied to a code management server, where the method may include:
s101: development task information is obtained.
In order to plan software development, it is necessary to obtain development task information, where the development task information may include the following information: the name of the software to be developed, the type of the software to be developed, the services included in the software to be developed, the function list included in the software to be developed, and the like.
The type of the software to be developed may be a game type, an office type, and the like.
The services that the software to be developed includes depend on what the software to be developed is, for example: if the software to be developed is game software, the services included in the software to be developed can be game character clothing services, game interface services, game character modeling services and the like; the software to be developed is enterprise management system software, and the services included in the software to be developed can be news bulletin services, conference room management services and enterprise internal process services.
The functions included in the software to be developed are functions possessed by services included in the software to be developed, for example: the software to be developed is game software, the services included in the software to be developed include game character clothing service, game interface service and game character modeling service, and because the game character clothing service has a function of providing clothing for characters in a game, the game interface service has a function of providing a game interface, and the game character modeling service has a function of providing modeling for the characters in the game, the list of functions included in the software to be developed includes: the functions of clothing, game interface and modeling are provided for the characters in the game.
S102: and dividing the development task information according to a preset division rule to obtain a plurality of subtask information.
Because software development needs multiple developers to cooperate together to complete, after the development task information is obtained, the development task information needs to be divided according to a preset division rule to obtain multiple pieces of subtask information. So that each developer develops according to the subtask information of the developer.
The development task information is divided according to the preset division rule, and there are various ways of obtaining the plurality of subtask information, including but not limited to the following:
the first mode is as follows:
partitioning is based on the coding architecture.
Referring to fig. 2, step S102 may include:
s1021: and acquiring preset coding architecture information.
A variety of coding architectures currently exist for computer systems. Illustratively, the encoding architecture may include: a two-tier architecture and a three-tier architecture.
The two-layer architecture refers to a C/S (Client/Server) structure, and includes two layers: the database server receives the instruction sent by the client and performs operations such as query and update on the database, and then the operation result is returned to the client. In the two-layer architecture, the client is directly contacted with the server, so the two-layer architecture has the advantages of high flexibility and poor safety.
The three-layer architecture refers to the fact that a user interface, business logic and data logic are divided into three different processing layers by means of middleware: a presentation layer, an intermediate layer, and a data layer.
Presentation layer (user interface): its main function is to realize user interaction and data representation, collect data for later processing, request the service logic of the second layer to call the core service processing, and display the processing result.
Middle layer (business logic): the core business logic of the whole application system is realized, the business logic is usually divided into independent modules, and the independent modules are realized by combining an application programming interface API provided by middleware with a programming interface provided by a database. And the client side calls the independent modules to realize corresponding service operation.
Data layer (data logic): the database is responsible for managing data resources of the whole application system and completing data operation.
In order to divide development task information, preset coding architecture information is stored in advance, wherein the preset coding architecture information comprises the type of a coding architecture, the number of coding layers contained in the coding architecture and characteristic information of each layer of coding layer.
The feature information of each layer of coding layer is used for representing the features of the layer, the feature information of the user interface layer can be used for representing the information interacted with a user, the feature information of the service logic layer can be used for representing the information related to the core service of the software to be developed, and the feature information of the data logic layer can be used for representing the information related to the data resources.
The preset coding architecture information may be stored in any computer-recognizable storage manner, and for example, the preset coding architecture information may be stored in a manner that: the preset encoding architecture information is stored in a list form.
The preset encoding architecture information is stored in a list form, and the preset encoding architecture is a two-layer architecture, for example, the stored preset encoding architecture information may be shown in the following table:
Figure BDA0001716921680000111
since software is developed based on the coding architecture, the development task information may be divided based on the coding architecture, and in order to divide the development task information based on the coding architecture, it is necessary to obtain pre-stored preset coding architecture information.
S1022: and determining the coding hierarchy included by the preset coding architecture information.
After the preset coding architecture information is obtained, the coding hierarchy included in the preset coding architecture information needs to be determined.
For example: assuming that the coding architecture is a two-layer architecture, the coding architecture includes two coding layers: a user interface layer and a service logic layer; assuming that the coding architecture is a three-layer architecture, the coding architecture includes three coding layers: a presentation layer, an intermediate layer, and a data layer.
S1023: and dividing the development task information based on the coding levels to obtain a plurality of pieces of sub-task information, wherein one coding level corresponds to one piece of sub-task information.
After the coding levels are determined, the development task information can be divided based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
Based on the coding hierarchy, the method for dividing the development task information to obtain multiple pieces of subtask information may be as follows: and dividing information matched with each piece of feature information in the development task information into subtask information corresponding to each piece of feature information based on the feature information of each coding layer.
For example: assuming that the coding architecture is a two-layer architecture, the two-layer architecture comprises a user interface layer and a service logic layer, assuming that software to be developed is enterprise management system software, and services included in the software to be developed comprise a news bulletin service, a conference room management service and an enterprise internal flow service;
since the business process inside the enterprise needs to interact with the user, for example: the reimbursement needs to be filled in an reimbursement order, so that the internal process business of the enterprise is matched with the characteristic information of the user interface layer, and the core business of the enterprise management system software is a management business, so that the news bulletin business and the conference room management business except the internal process business of the enterprise have correlation with the core business of the enterprise management system software, and therefore the news bulletin business and the conference room management business are matched with the characteristic information of the business logic layer;
dividing the development task information to obtain 2 subtask information, which are respectively: applying subtask information corresponding to the user interface layer, wherein the subtask information comprises: the method comprises the following steps of enterprise internal flow business and subtask information corresponding to a business logic layer, wherein the subtask information comprises the following components: news bulletin services and conference room management services.
Therefore, the development task information is divided based on the coding hierarchy included in the coding architecture to obtain a plurality of subtask information.
The second mode is as follows:
the partitioning is based on the traffic type.
Referring to fig. 3, step S102 may include:
s1024: and determining the service type corresponding to the development task information.
Generally, when determining development task information, various services related to the development task information have been set in advance, for example: the development task information is an enterprise management system, namely enterprise management system software needs to be developed, and the preset enterprise management system comprises: news bulletin service, meeting room management service and enterprise internal flow service, wherein the enterprise internal flow service comprises reimbursement flow service, leave asking flow service and purchase flow service.
Each service corresponds to a service type, and the same service type generally has similar or same characteristics during development, so that the development is carried out together, the operation of developers is facilitated, and the development efficiency can be improved, so that the division can be carried out based on the service types when the development task information is divided. When the development task information is determined, a plurality of services related to the development task information are preset, and each service corresponds to a service type, so that the service type corresponding to each service is also determined, and therefore, the service type corresponding to the development task information can be determined as follows: and determining the service types corresponding to the multiple services related to the development task information as the service types corresponding to the development task information.
Some service types belong to a single service type and some service types belong to multiple service types, wherein the single service type refers to only one service type, and the multiple service types refer to at least two service types.
For example: the business type of the news bulletin business belongs to a single business type, and the business type of the internal process business of the enterprise belongs to a multi-business type.
In order to perform the division based on the service type, the service type corresponding to the development task information needs to be determined.
For example: if the development task information is an enterprise management system, determining that the service type corresponding to the development task information is as follows: news bulletin service type, conference room management service type, and enterprise internal flow service type.
S1025: and dividing the development task information based on the pre-service type to obtain a plurality of subtask information.
After the service type corresponding to the development task information is determined, the development task information can be divided based on the service type to obtain a plurality of subtask information.
Step S1025 may include:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each subtask information included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
And under the condition that the service type belongs to a single service type, only one service type is shown, and at the moment, the service type is determined to correspond to one piece of subtask information.
For example: the development task information is an enterprise management system, and the determined service type corresponding to the development task information is as follows: the method comprises the following steps that a news bulletin service type, a conference room management service type and an enterprise internal flow service type are determined, and the news bulletin service type and the conference room management service type belong to a single service type, so that the news bulletin service type corresponds to subtask information, and the conference room management service type corresponds to subtask information.
Under the condition that the service type belongs to multiple service types, the service types are multiple, and at the moment, similar to a single service type, the fact that the service type corresponds to subtask information can be determined.
For example: the development task information is an enterprise management system, and the determined service type corresponding to the development task information is as follows: the business type of the internal process of the enterprise belongs to multiple business types, and at the moment, the business type of the internal process of the enterprise is determined to correspond to subtask information.
Because the internal functions of the multi-service type are complex and the service types may not need to be developed simultaneously, it can be determined that each sub-service type included in the service type corresponds to one piece of sub-task information.
For example: the development task information is an enterprise management system, and the determined service type corresponding to the development task information is as follows: the method comprises the steps of determining that the business type of the reimbursement process corresponds to one piece of subtask information, determining that the business type of the leave-asking process corresponds to one piece of subtask information, and determining that the business type of the purchasing process corresponds to one piece of subtask information.
Therefore, the development task information is divided based on the service type corresponding to the development task information, and a plurality of subtask information are obtained.
The third mode is as follows:
the partitioning is based on coding architecture and traffic type.
Referring to fig. 4, step S102 may include:
s1026: and acquiring preset coding architecture information.
S1027: and determining the coding hierarchy included by the preset coding architecture information.
Steps S1026 to S1027 are similar to steps S1021 to S1022 in fig. 2, and specific reference may be made to the description of steps S1021 to S1022 in fig. 2, which is not described herein again.
S1028: and dividing the development task information based on the coding levels to obtain a plurality of target task information, wherein one coding level corresponds to one target task information.
After the coding levels are determined, the development task information can be divided based on the coding levels to obtain a plurality of target task information, wherein one coding level corresponds to one target task information.
The method for dividing the development task information based on the coding hierarchy to obtain a plurality of target task information may be as follows: and dividing information matched with each characteristic information in the development task information into target task information corresponding to each characteristic information based on the characteristic information of each coding layer.
For example: assuming that the coding architecture is a two-layer architecture, the two-layer architecture comprises a user interface layer and a service logic layer, assuming that software to be developed is enterprise management system software, and services included in the software to be developed comprise a news bulletin service, a conference room management service and an enterprise internal flow service;
since the business process inside the enterprise needs to interact with the user, for example: the reimbursement needs to be filled in an reimbursement order, so that the internal process business of the enterprise is matched with the characteristic information of the user interface layer, and the core business of the enterprise management system software is a management business, so that the news bulletin business and the conference room management business except the internal process business of the enterprise have correlation with the core business of the enterprise management system software, and therefore the news bulletin business and the conference room management business are matched with the characteristic information of the business logic layer;
dividing the development task information to obtain 2 pieces of target task information, which are respectively: the target task information corresponding to the user interface layer comprises: the method comprises the following steps of enterprise internal flow business and target task information corresponding to a business logic layer, wherein the target task information comprises: news bulletin services and conference room management services.
S1029: and determining the service type corresponding to each target task information.
Because the coding architecture is a large framework, the development task information is divided based on the coding architecture, and the obtained target task information is small in quantity, for example: the two-layer framework obtains 2 target task information, and the three-layer framework obtains 3 target task information, so that the development content of each target task information is more, and the development efficiency is lower. In order to improve development efficiency, after the division is performed based on the coding architecture, each target task information may be further divided based on the service type.
Generally, when determining development task information, a plurality of services related to the development task information are preset, after obtaining target task information, services related to each target task information are known, and since each service corresponds to a service type, a service type corresponding to each service is also determined, and therefore, the service type corresponding to the determined target information may be: and determining the service types corresponding to the services related to the target task information as the service types corresponding to the target task information.
Therefore, after the target task information is determined, the service type corresponding to each target task information can be determined.
For example: in the example of step S1028, since the service type corresponding to the service related to the target task information corresponding to the user interface layer is the enterprise internal process service type, it is determined that the service type corresponding to the target task information corresponding to the user interface layer is: enterprise internal flow business type;
because the service types corresponding to the services related to the target task information corresponding to the service logic layer are the news bulletin service type and the conference room management service type, the service types corresponding to the target task information corresponding to the service logic layer are determined as follows: a news bulletin service type and a conference room management service type.
S1030: and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
After the service type corresponding to each target task information is determined, each target task information can be divided based on the determined service type to obtain a plurality of subtask information.
In the method of dividing the development task information based on both the coding architecture and the service type, the plurality of pieces of task information obtained by dividing the development task information are referred to as target task information, and the plurality of pieces of task information obtained by further dividing the target task information are referred to as subtask information.
The manner of dividing each target task information based on the determined service type to obtain multiple pieces of subtask information may be as shown in fig. 4, and is not described herein again.
For example: receiving the example of the step S1029, dividing the target task information corresponding to the user interface layer, and determining that the business type of the internal process of the enterprise corresponds to one piece of subtask information because the business type of the internal process of the enterprise belongs to multiple business types, or determining that the business type of the reimbursement process corresponds to one piece of subtask information, determining that the business type of the leave-asking process corresponds to one piece of subtask information, and determining that the business type of the purchase process corresponds to one piece of subtask information;
and dividing target task information corresponding to the service logic layer, wherein the news bulletin service type and the conference room management service type belong to a single service type, so that the news bulletin service type is determined to correspond to one piece of subtask information, and the conference room management service type is determined to correspond to one piece of subtask information.
Therefore, under the condition that the development task information is divided based on the coding hierarchy included by the coding architecture to obtain a plurality of target task information, each target task information is divided based on the service type corresponding to the target task information to obtain a plurality of subtask information, and compared with a mode of dividing based on the coding architecture only, the development efficiency is improved.
S103: and receiving a code compiled by the developer based on the subtask information, and generating a program corresponding to the subtask information.
After the plurality of subtask information are obtained, prompt information can be output to prompt developers to generate the subtask information, and the developers can obtain the subtask information to be developed and develop the subtask information after receiving the prompt information.
After the development of the developer is completed, the written code, namely the code written based on the subtask information, is sent to the code management server.
And the code management server receives a code compiled by a developer based on the subtask information and generates a program corresponding to the subtask information. That is, the code management server generates a program corresponding to the subtask information by receiving how many developers write the code based on the subtask information. And the program corresponding to the generated subtask information is used for packaging.
In the implementation of the invention, the development task information is obtained, the development task information is divided according to the preset division rule to obtain a plurality of subtask information, and a code compiled by a developer based on the subtask information is received to generate a program corresponding to the subtask information. According to the invention, after the development task information is obtained, the development task information is divided according to the preset division rule mode, so that the artificial division is avoided, the division period is shortened, the developer can obtain the subtask information per se quickly, the development starting time of the developer is earlier, then the code compiled by the developer based on the subtask information is received, the program corresponding to the subtask information is generated, and the development period is shortened.
On the basis of the method shown in fig. 1, after step S103, referring to fig. 5, the program generating method provided in the embodiment of the present invention may further include:
s104: and receiving a packing task instruction, determining a program to be packed contained in the packing task instruction from the program corresponding to the subtask information, and sending the program to be packed to a packing server so that the packing server packs and deploys the program to be packed.
It should be noted that the application scenario in the embodiment of the present invention includes a packaging server, a task management server, a code management server, and a test server.
The packaging server is mainly used for packaging the codes to be packaged and deploying the packaged program package to the test server.
The code management server is mainly used for managing codes written by developers, the codes written by the developers based on the subtask information are all sent to the code management server, the code management server generates programs corresponding to the subtask information from the received codes, the generated programs corresponding to the subtask information can be used for packaging, and the code management server stores the programs corresponding to the subtask information and generates tasks. And storing the corresponding relation between the task number of the generated task and the code of the program, and sending the generated task to the task management server.
The task management server faces to the manager, and is used for receiving the tasks sent by the code management server, managing the received tasks, receiving a management instruction of the manager, and generating a task number to be packaged, wherein the management instruction indicates that the task to be packaged selected by the manager exists.
The test server is mainly used for testing the packaged program package.
The following describes packing and unpacking, respectively:
the code written and submitted by the developer needs to be translated into machine readable bytecodes, a process called compilation, for example: when a developer writes codes by using JAVA, the codes, namely, files with extensions of JAVA, are compiled into byte codes, namely, files with extensions of class.
Since the byte code files are many and inconvenient to deploy and manage, some kind of byte codes are packaged together, and the process is called packaging, for example: and packaging byte codes of the java program, namely the file with the extension of class into a file with the extension of jar.
The process of splitting the file generated by packaging into a plurality of files is called unpacking. For example: and splitting the jar file generated by the encapsulation into a plurality of jar files.
When packaging is needed, a manager sends a task instruction to the packaging server, and after receiving the task instruction, the packaging server obtains a task number to be packaged contained in the task instruction from the task management server.
And after the packaging server obtains the to-be-packaged task number, displaying the to-be-packaged task number in a to-be-packaged task bar of the packaging deployment interface.
Because the code management server stores the corresponding relationship between the task number and the code of the program, in order to package the code of the program to be packaged corresponding to the task to be packaged, after the packaging task number is displayed, the packaging server needs to obtain the program to be packaged corresponding to the task number to be packaged from the code management server, and because the program is generated based on the code, obtaining the program to be packaged corresponding to the task number to be packaged is to obtain the code of the program to be packaged corresponding to the task number to be packaged.
The packaging server obtains the program to be packaged corresponding to the task number to be packaged from the code management server in the following mode: and sending a packing task instruction to the code management server, wherein the packing instruction comprises the serial number of the task to be packed.
The code management server stores the program corresponding to the subtask information, so that the code management server receives the packing task instruction, can search the program to be packed corresponding to the task number to be packed included in the packing task instruction from the program corresponding to the subtask information, namely determines the program to be packed included in the packing task instruction, and sends the searched program to be packed to the packing server, namely sends the program to be packed included in the packing task instruction to the packing server, so that the packing server performs packing deployment on the program to be packed.
Therefore, after the packaging task instruction is received, the packaging server packages and deploys the program to be packaged in a mode of sending the program to be packaged contained in the packaging task instruction to the packaging server
The packaging server packages and deploys the program to be packaged, which may include:
and packaging the codes of the program to be packaged based on a preset packaging rule to obtain a program package to be tested, and deploying the program package to be tested to a test server.
Specifically, the packaging server may package the code of the program to be packaged by using a packaging tool, which may be, for example, a maven tool.
The above-mentioned based on predetermine the packing rule, treat that the code of packing procedure packs and obtain the procedure package that awaits measuring can be: and packaging based on the service type of the program to be packaged to obtain the program package to be tested. Specifically, based on the preset packaging rule, packaging the code of the program to be packaged to obtain the program package to be tested, which may include:
(1) And determining the service type of the program to be packaged.
Generally, the program to be developed will involve a variety of services, such as: the program to be developed is an enterprise management system, and the enterprise management system comprises: the system comprises a news bulletin service, a conference room management service and an enterprise internal process service, wherein the enterprise internal process service comprises an reimbursement process service, a leave asking process service and a purchase process service. Each service corresponds to a service type, and programs corresponding to the same service type generally have similar or same characteristics during development, so that the programs are developed together, the operation of developers is facilitated, and the development efficiency can be improved.
In each program included in the program to be developed, some program corresponding service types are single service types, and some program corresponding service types are multi-service types, wherein the single service type means that only one program corresponding service type is provided, and the multi-service type means that at least two program corresponding service types are provided.
For example: the service type corresponding to the program corresponding to the news bulletin service is a single service type, and the service type corresponding to the degree corresponding to the internal process service of the enterprise is a multi-service type.
Since the program to be packaged may be a part of or all of the program to be developed, the service type corresponding to the program to be packaged may be a single service type or a multi-service type.
For the program to be packaged of multiple service types, if the codes of multiple service types corresponding to the program to be packaged are packaged and tested as a whole, if a certain service of the multiple service types fails to pass the test, even if other types of services all pass the test, the program to be packaged cannot be on-line, so that when the codes of the program to be packaged are packaged, the service type of the program to be packaged needs to be determined in advance so as to perform subsequent operations.
When the program to be developed is developed, the corresponding relationship between the identifier of each program included in the program to be developed and the service type is stored in advance, so the manner of determining the service type of the program to be packaged may be: and determining the identifier of the program to be packaged, and determining the service type corresponding to the program to be packaged based on the corresponding relation between the identifier of each program and the service type included in the pre-stored program to be developed.
For example, the correspondence relationship between the identifier of each program included in the pre-stored program to be developed and the service type may be shown as the following table:
identification of programs Type of service
A Single service type
B Multiple service types
(2): and under the condition that the service type of the program to be packaged is a single service type, integrally packaging the codes of the program to be packaged to obtain a program package to be tested.
And under the condition that the service type of the program to be packaged is determined to be a single service type, the service type corresponding to the program to be packaged is only one, and at the moment, the codes of the program to be packaged are integrally packaged to obtain a program package to be tested.
(4): and when the service type of the program to be packaged is a multi-service type, integrally packaging the codes of the program to be packaged to obtain a target program package, unpacking the target program package based on the service type of the service included in the program to be packaged to obtain a program package to be tested, or unpacking the target program package based on the attribute information of the service included in the program to be packaged to obtain the program package to be tested.
Under the condition that the service type of the program to be packaged is determined to be a multi-service type, the service types of the services included by the program to be packaged are multiple, in order to avoid the influence of the on-line of the program to be packaged, codes of the program to be packaged are integrally packaged to obtain a target program package, and then the target program package is unpacked to obtain the program package to be tested.
It should be noted that there are various ways to unpack the target package to obtain the to-be-tested package, including but not limited to the following:
the first mode is as follows:
and unpacking the target program package based on the service type of the service included in the program to be packaged to obtain the program package to be tested.
The unpacking of the target program package based on the service type of the service included in the program to be packaged to obtain the program package to be tested may be: the program to be packaged is divided into a plurality of program packages to be tested according to the service types. The method specifically comprises the following steps:
determining the service type of each service included in the program to be packaged;
and splitting the codes of the services of the same service type in the target program package into a program package to be tested.
When a program to be developed is developed, a correspondence relationship between an identifier of each program included in the program to be developed and each service included in each program and a service type of the service is stored in advance, and therefore, determining the service type of each service included in the program to be packaged may be: and determining the identifier of the program to be packaged, and determining the service type of each service included by the program to be packaged based on the corresponding relation between the identifier of each program included by the program to be developed and each service included by each program and the service type of each service.
For example, the correspondence relationship between the identifier of each program included in the pre-stored program to be developed and each service included in each program and the service type of the service may be as shown in the following table:
Figure BDA0001716921680000211
Figure BDA0001716921680000221
the object program package is obtained by integrally packaging the codes of the program to be packaged, so that the service included by the program to be packaged is the service included by the object program package, and after the service type of each service included by the program to be packaged is determined, namely the service type of each service included by the object program package is determined, the codes of the services of the same service type in the object program package can be split into the program packages to be tested.
For example: for the target program package corresponding to the program C to be packaged in the table above, since the service types of the service M and the service O are both a, the code of the service M and the code of the service O in the target program package corresponding to the program C to be packaged can be split into one program package to be tested, the code of the service N can be split into one program package to be tested, and two program packages to be tested are obtained by splitting in total.
For a clearer understanding of the above unpacking process based on service types, the following description is made by using specific service examples:
for example: assuming that the program to be packaged is a program corresponding to the internal flow business of the enterprise, wholly packaging codes of the program to be packaged to obtain a target program package;
because the enterprise internal process service includes three service types, namely reimbursement process service, leave request process service and purchase process service, the service type of each service included in the program to be packaged, namely the service type of each service included in the target program package is determined as follows: the method comprises the following steps of (1) reimbursing a process service type, asking for leave process service type and purchasing process service type;
splitting the code of the service of the same service type in the target program package into a program package to be tested: a program package to be tested corresponding to the reimbursement process service, a program package to be tested corresponding to the leave process service and a program package to be tested corresponding to the purchase process service.
Therefore, the target program package can be unpacked based on the service type of the service included by the program to be packed, the codes of the same service type are separated into one package, when the test is carried out, the package can be tested independently, no influence is generated on other packages, when the test is passed, the package can be independently on-line, and the situation that the whole program to be packed cannot be on-line due to the fact that certain generated service does not pass the test after the codes of various service types are integrally packed is avoided.
The second mode is as follows:
unpacking the target program package based on the attribute information of the service included in the program to be packaged to obtain the program package to be tested.
The unpacking the target program package based on the attribute information of the service included in the program to be packaged to obtain the program package to be tested may be:
determining attribute information of a service included in a program to be packaged;
determining correlation among the services based on the attribute information;
and splitting the codes of the services with the correlation larger than a preset threshold value in the target program package into a program package to be tested.
Since each service included in the target package may not exist independently, and there may be a correlation between one service and another service, when unpacking the target package, the service with a larger correlation may be unpacked into a to-be-tested package.
In order to determine the correlation between services, attribute information of a service included in an object program package needs to be determined, and because the object program package is obtained by integrally packaging codes of a program to be packaged, the service included in the program to be packaged is the service included in the object program package, and therefore, the attribute information of the service included in the object program package, that is, the attribute information of the service included in the program to be packaged, is determined. In the implementation of the invention, the attribute information of the service can be the service type of the service or the realization function of the service.
When a program to be developed is developed, a correspondence relationship between an identifier of each program included in the program to be developed, each service included in each program, and attribute information of the service is stored in advance, and therefore, determining an attribute of a service included in a program to be packaged may be: and determining the identifier of the program to be packaged, and determining the attribute information of each service included by the program to be packaged based on the corresponding relation between the identifier of each program included by the program to be developed and each service included by each program and the attribute information of the service.
For example, the correspondence relationship between the identifier of each program included in the pre-stored program to be developed and each service included in each program and the attribute information of the service may be shown as the following table:
Figure BDA0001716921680000231
Figure BDA0001716921680000241
after determining the attribute information of the services, determining the correlation between the services based on the attribute information, which may be, for example, based on the attribute information, determining the correlation between the services as follows: and calculating the similarity among the attribute information of each service.
Because the services with larger correlation may have similar or identical characteristics, the services are tested together, which is more beneficial for the operation of testers and can also improve the testing efficiency, so after the correlation among the services is determined, the code of the service with the correlation larger than the preset threshold value can be used as a program package to be tested.
In order to more clearly understand the above unpacking process based on the attribute information of the service, the following description is made by using a specific service example:
for example: assuming that the attribute information of the service is the service type and assuming that the program to be packaged is a program corresponding to the internal process service of the enterprise, integrally packaging the codes of the program to be packaged to obtain a target program package;
because the enterprise internal flow service includes three service types, namely reimbursement flow service, leave-asking flow service and purchase flow service, determining the attribute information of the service included by the program to be packaged, namely the attribute information of the service included by the target program package, as follows: the method comprises the following steps of (1) reimbursing a process service type, asking for leave process service type and purchasing process service type;
because the purchase money needs to be reimbursed after purchase, the correlation between the reimbursement process business and the purchase process business is large, the correlation between the leave-asking process business and the reimbursement process business is small, the correlation between the leave-asking process business and the purchase process business is small, and the preset threshold value is assumed to be 60%;
assume that, based on the attribute information, the correlation between the respective services is determined as follows: the correlation between the reimbursement process service and the purchase process service is 90%, the correlation between the reimbursement process service and the leave asking process service is 40%, and the correlation between the leave asking process service and the purchase process service is 30%;
splitting codes of services with correlation larger than a preset threshold value in a target program package into a program package to be tested: a program package to be tested corresponding to the reimbursement process service and the purchase process service and a program package to be tested corresponding to the leave process service.
Therefore, the target program package can be unpacked based on the attribute information of the service, the codes of the service with the correlation are separated into one package, the subsequent test operation is facilitated, and the test efficiency can be improved.
After the program package to be tested is obtained, the program package to be tested can be deployed to the test server. The test server can test the program package to be tested after receiving the program package to be tested.
Because some programs in the test server are modified in the process of deploying the program packages to be tested to the test server, and the modified programs can take effect only after the test server is restarted, and meanwhile, some functions currently running in the test server can also be caused to fail in the process of deploying the program packages to be tested to the test server, in order to enable the failed programs and the failed functions caused by the two situations to take effect, the test server can be restarted after the test is completed.
Since the testing server may test other program packages to be tested at the same time, if the testing server is restarted at this time, the testing server cannot test other programs to be tested, and therefore, the testing server can be restarted at an idle time, which uses less time for the testing server, for example: timing night 18:00-24: the test server is restarted between 00.
The number of the test servers can be one or multiple, and when one test server is used, the packaging server deploys all the to-be-tested program packages to the test server for testing, so that the load of the test server is large, the test efficiency is low, and therefore, in order to improve the test efficiency, multiple test servers can be set.
When there are multiple test servers, the deploying the to-be-tested program package to the test server may be: the deploying is performed based on a function of the to-be-tested program package, specifically, the deploying of the to-be-tested program package to the test server may include:
(A) The method comprises the following steps And determining the target function corresponding to the program package to be tested.
Generally, a program to be developed relates to a plurality of services, each of which or several services can implement a function, and therefore, when the program to be developed is developed, the correspondence between the identification and the function of each program included in the program to be developed is predetermined.
For example, the correspondence relationship between the identifier and the function of each program included in the predetermined program to be developed may be shown as the following table:
identification of programs Function(s)
E Function R
F Function S
Because the content of the test for each function may be different, if different functions are placed in different test servers for testing, the test efficiency can be improved, therefore, different test servers are preset to test different functions, that is, the preset corresponding relationship between the functions and the test servers is set.
For example, the preset correspondence between the preset functions and the test server may be shown as the following table:
test server Function(s)
Test server X Function R
Test server Y Function S
In order to determine to which test server the program package to be tested needs to be deployed for testing, the target function corresponding to the program package to be tested needs to be determined. The method for determining the target function corresponding to the program package to be tested may be as follows: and determining the identifier of the program to be packaged corresponding to the program package to be tested, and determining the target function corresponding to the program package to be tested based on the corresponding relation between the preset identifier and the function.
(B) The method comprises the following steps And determining a test server corresponding to the target function according to the preset corresponding relation between the function and the test server.
After the target function corresponding to the program package to be tested is determined, the test server corresponding to the target function can be determined according to the preset corresponding relation between the function and the test server.
(C) The method comprises the following steps And deploying the program package to be tested to a test server corresponding to the target function.
After the test server corresponding to the target function is determined, it is known which test server the target function corresponding to the program package to be tested needs to test at, and at this time, the program package to be tested is deployed to the test server corresponding to the target function so as to perform the test.
In order to more clearly understand the process of deploying the program package to be tested to the test server, the following description is made by using a specific service example:
for example: assuming that the to-be-developed program is an enterprise management system, assuming that the predetermined correspondence relationship between the identifier and the function of each program included in the to-be-developed program is shown in the following table:
identification of programs Function(s)
Identification J of program corresponding to news bulletin service News announcement functionality
Identification K of program corresponding to conference room management service Conference room management function
Identification L of program corresponding to enterprise internal flow business Internal flow function
Assuming that the program package to be tested is a program package obtained by packaging codes of a program corresponding to the enterprise internal flow business, determining that the identifier of the program to be packaged corresponding to the program to be tested is L, and determining that a target function corresponding to the program package to be tested is an internal flow function because the function corresponding to L is the internal flow function;
assume that the preset correspondence between the preset functions and the test server is as shown in the following table:
test server Function(s)
Test server X News announcement functionality
Test server Y Conference room management function
Test server Z Internal flow function
Then, according to the preset corresponding relationship between the functions and the test servers, determining that the test servers corresponding to the target functions, namely the internal flow functions, are: testing a server Z;
and deploying the program package to be tested to a test server Z corresponding to the target function.
Therefore, when a plurality of test servers are provided, the test deployment can be performed based on the functions of the program packages to be tested, and compared with the condition that only one test server exists in the related art, the test deployment method improves the test efficiency, and meanwhile, compared with the manual test deployment mode, the test deployment efficiency is improved.
Because when more program packages to be tested need to be tested, or more test functions need to be tested, each function is tested only by one test server, which may result in slow operation, and further makes the test efficiency lower, the test server may be set to include a plurality of test server clusters, and the program packages to be tested are tested in a cluster manner.
When the test server includes a plurality of test server clusters, the deploying the to-be-tested package to the test server may include:
determining a target function corresponding to the program package to be tested;
determining a test server cluster corresponding to the target function according to the preset corresponding relation between the function and the test server cluster;
and deploying the program package to be tested to the test server cluster corresponding to the target function.
Generally, a program to be developed relates to a plurality of services, each of which or several of which can implement a function, and therefore, when the program to be developed is developed, the correspondence between the identification and the function of each program included in the program to be developed is predetermined.
For example, the correspondence relationship between the identifier and the function of each program included in the predetermined program to be developed may be shown in the following table:
identification of programs Function(s)
E Function R
F Function S
Because the content of the test for each function may be different, if different functions are placed in different test server clusters for testing, the test efficiency can be improved, therefore, different test server clusters are preset for testing different functions, that is, the preset corresponding relationship between the functions and the test server clusters is set.
For example, the preset correspondence between the preset functions and the test server cluster may be shown in the following table:
test server cluster Function(s)
Test server cluster W Function R
Test server cluster U Function S
In order to determine to which test server cluster the program package to be tested needs to be deployed for testing, a target function corresponding to the program package to be tested needs to be determined. The method for determining the target function corresponding to the program package to be tested may be as follows: and determining the identifier of the program to be packaged corresponding to the program package to be tested, and determining the target function corresponding to the program package to be tested based on the corresponding relation between the preset identifier and the function.
After the target function corresponding to the program package to be tested is determined, the test server cluster corresponding to the target function can be determined according to the preset corresponding relation between the function and the test server cluster.
After the test server cluster corresponding to the target function is determined, it is known which test server cluster the target function corresponding to the program package to be tested needs to be tested in, and at this time, the program package to be tested is deployed to the test server cluster corresponding to the target function so as to be tested.
Since a test server cluster generally includes a master server and a plurality of slave servers, where the master server is configured to control the plurality of slave servers, the deploying the to-be-tested package to the test server cluster corresponding to the target function may be: and deploying the program package to be tested to a main server in a test server cluster corresponding to the target function, so that the main server determines a target slave server from a plurality of slave servers according to a load balancing principle, and deploying the program package to be tested to the target slave server.
In order to more clearly understand the process of deploying the program package to be tested to the test server cluster, the following description is made by using a specific service example:
for example: assuming that the program to be developed is an enterprise management system, assuming that the predetermined correspondence between the identifier and the function of each program included in the program to be developed is as shown in the following table:
identification of programs Function(s)
Identification J of program corresponding to news bulletin service News announcement functionality
Identification K of program corresponding to conference room management service Conference room management function
Identification L of program corresponding to enterprise internal flow business Internal flow function
Assuming that the program package to be tested is a program package obtained by packaging codes of a program corresponding to the enterprise internal flow business, determining that the identifier of the program to be packaged corresponding to the program to be tested is L, and determining that a target function corresponding to the program package to be tested is an internal flow function because the function corresponding to L is the internal flow function;
assume that the preset correspondence between the preset functions and the test server cluster is shown in the following table:
Figure BDA0001716921680000291
Figure BDA0001716921680000301
determining a target function, namely a test server cluster corresponding to the internal flow function, according to a preset corresponding relationship between the function and the test server cluster, as follows: testing the server cluster V;
deploying the program package to be tested to a test server cluster V corresponding to the target function;
assuming that the test server cluster V includes a master server a, a slave server B, and a slave server C, and assuming that the target slave server determined by the master server a from the multiple slave servers according to the load balancing principle is the slave server B, the deploying the to-be-tested package to the test server cluster V corresponding to the target function may be: and deploying the program packages to be tested to a master server A in a test server cluster V corresponding to the target function, so that the master server A deploys the program packages to be tested to a target slave server B.
Therefore, when the test server comprises a plurality of test server clusters, one function can be tested through one test server cluster, the test deployment of the program package to be tested is realized in a cluster mode, and compared with the condition that only one function is tested through one test server, the test efficiency is improved.
Therefore, the packaging server obtains the program package to be tested by packaging the code of the program to be packaged based on the preset packaging rule, and deploys the program package to be tested to the test server, so that the purpose of automatic packaging and deployment is achieved, manual packaging is not needed, the workload of packaging and deployment is reduced, time consumption is reduced, the error rate during deployment is reduced due to automatic packaging and deployment, and the efficiency of packaging and deployment is improved.
After the packaging server deploys the program package to be tested to the test server, the packaging server can also receive the page file corresponding to the task to be packaged of the code management server, and deploys the page file to the test server.
Since the developed program to be developed needs to be displayed in the form of a page, when the program to be developed is developed, the program to be developed is developed by a developer and includes not only the code of the program but also a page file. When a developer submits a written code to a code management server, the developer also needs to submit a page file corresponding to the code.
The code management server receives written codes and corresponding page files submitted by developers, generates tasks, stores the corresponding relation between task numbers of the generated tasks and codes of programs, and stores the corresponding relation between the task numbers and the page files.
When the package deployment is performed, not only the packaged program package but also the page file need to be deployed. Therefore, in order to deploy the page file, after the packaging server deploys the to-be-packaged program package to the test server, the packaging server needs to obtain the page file corresponding to the to-be-packaged task. The mode of obtaining the page file corresponding to the task to be packaged may be receiving the page file corresponding to the task to be packaged sent by the code management server.
Because the task number of the task to be packaged and the page file have a corresponding relationship, in order to obtain the page file corresponding to the task to be packaged, after the program package to be tested is deployed to the test server, the packaging server may send an acquisition request to the code management server, and in order to enable the code management server to know which page file corresponding to which task is to be acquired, the task number of the task to be packaged is carried in the acquisition request.
Because the code management server stores the corresponding relation between the task number and the page file, after receiving the acquisition request, the code management server can determine the page file corresponding to the task number of the task to be packaged according to the corresponding relation between the task number and the page file, and sends the determined page file to the packaging server.
And the packaging server receives the page file sent by the code management server, namely, the page file corresponding to the task to be packaged is obtained.
Illustratively, the page file may include at least one of an HTML (HyperText Markup Language) file, a CSS (Cascading Style Sheets) file, or a JS (script) file.
After receiving the page file corresponding to the task to be packaged sent by the code management server, the page file can be deployed to the test server.
Therefore, the program packages to be tested are deployed to the test server, and meanwhile, the page files are also deployed to the test server, so that the page files can be tested conveniently.
With respect to the above method embodiment, fig. 6 is a schematic structural diagram of a program generating apparatus according to an embodiment of the present invention, where the apparatus is applied to a code management server, and may include:
an obtaining module 601, configured to obtain development task information;
a dividing module 602, configured to divide the development task information according to a preset dividing rule to obtain multiple pieces of subtask information;
a receiving module 603, configured to receive a code written by a developer based on the subtask information, and generate a program corresponding to the subtask information.
In the implementation of the invention, the development task information is obtained, the development task information is divided according to the preset division rule to obtain a plurality of subtask information, and a code compiled by a developer based on the subtask information is received to generate a program corresponding to the subtask information. According to the method and the device, after the development task information is obtained, the development task information is divided according to the preset division rule, so that manual division is avoided, the division period is shortened, developers can obtain the subtask information per se quickly, the time for the developers to start development is short, then codes compiled by the developers based on the subtask information are received, the program corresponding to the subtask information is generated, and the development period is shortened.
In an implementation manner of the present invention, the dividing module 602 may include:
a first preset coding architecture information obtaining unit, configured to obtain preset coding architecture information;
a first coding level determining unit, configured to determine a coding level included in the preset coding architecture information;
the first dividing unit is used for dividing the development task information based on the coding layers to obtain a plurality of subtask information, wherein one coding layer corresponds to one subtask information.
In an implementation manner of the present invention, the dividing module 602 may include:
the first service type determining unit is used for determining the service type corresponding to the development task information;
and the second dividing unit is used for dividing the development task information based on the service type to obtain a plurality of subtask information.
In an implementation manner of the present invention, the second dividing unit may be specifically configured to:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
In an implementation manner of the present invention, the dividing module 602 may include:
a second preset coding architecture information obtaining unit, configured to obtain preset coding architecture information;
a second coding level determining unit, configured to determine a coding level included in the preset coding architecture information;
the third dividing unit is used for dividing the development task information based on the coding layers to obtain a plurality of target task information, wherein one coding layer corresponds to one target task information;
the second service type determining unit is used for determining the service type corresponding to each target task information;
and the fourth dividing unit is used for dividing each target task information based on the determined service type to obtain a plurality of subtask information.
In one implementation manner of the present invention, the apparatus may further include:
and the instruction receiving module is used for receiving a packing task instruction after the program is generated, determining a program to be packed contained in the packing task instruction from the program corresponding to the subtask information, and sending the program to be packed to a packing server so that the packing server packs and deploys the program to be packed.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, including a processor 701 and a memory 702;
a memory 702 for storing a computer program;
a processor 701, which is configured to implement a program generation method applied to a code management server when executing a program stored in a memory, the method including:
acquiring development task information;
dividing the development task information according to a preset division rule to obtain a plurality of subtask information;
and receiving a code written by a developer based on the subtask information, and generating a program corresponding to the subtask information.
In the implementation of the invention, the electronic equipment acquires the development task information, divides the development task information according to the preset division rule to acquire a plurality of subtask information, receives the code compiled by the developer based on the subtask information, and generates the program corresponding to the subtask information. According to the method and the device, after the development task information is obtained, the development task information is divided according to the preset division rule, so that manual division is avoided, the division period is shortened, developers can obtain the subtask information per se quickly, the time for the developers to start development is short, then codes compiled by the developers based on the subtask information are received, the program corresponding to the subtask information is generated, and the development period is shortened.
In an implementation manner of the present invention, the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information may include:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
and dividing the development task information based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
In an implementation manner of the present invention, the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information may include:
determining a service type corresponding to the development task information;
and dividing the development task information based on the service type to obtain a plurality of subtask information.
In an implementation manner of the present invention, the step of dividing the development task information based on the service type to obtain a plurality of subtask information may include:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
In an implementation manner of the present invention, the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information may include:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
dividing the development task information based on the coding layers to obtain a plurality of target task information, wherein one coding layer corresponds to one target task information;
determining a service type corresponding to each target task information;
and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
In one implementation of the present invention, after the step of generating the program, the method may further include:
receiving a packing task instruction, determining a program to be packed contained in the packing task instruction from programs corresponding to the subtask information, and sending the program to be packed to a packing server, so that the packing server packs and deploys the program to be packed.
The Memory mentioned in the above electronic device may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements a program generating method applied to a code management server, where the method includes:
acquiring development task information;
dividing the development task information according to a preset division rule to obtain a plurality of subtask information;
and receiving a code written by a developer based on the subtask information, and generating a program corresponding to the subtask information.
In the implementation of the invention, when the computer program is executed by the processor, the development task information is obtained, the development task information is divided according to the preset division rule to obtain a plurality of subtask information, and a code compiled by a developer based on the subtask information is received to generate a program corresponding to the subtask information. According to the method and the device, after the development task information is obtained, the development task information is divided according to the preset division rule, so that manual division is avoided, the division period is shortened, developers can obtain the subtask information per se quickly, the time for the developers to start development is short, then codes compiled by the developers based on the subtask information are received, the program corresponding to the subtask information is generated, and the development period is shortened.
In an implementation manner of the present invention, the step of dividing the development task information according to a preset division rule to obtain a plurality of pieces of subtask information may include:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
and dividing the development task information based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
In an implementation manner of the present invention, the step of dividing the development task information according to a preset division rule to obtain a plurality of pieces of subtask information may include:
determining a service type corresponding to the development task information;
and dividing the development task information based on the service type to obtain a plurality of subtask information.
In an implementation manner of the present invention, the step of dividing the development task information based on the service type to obtain a plurality of subtask information may include:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
In an implementation manner of the present invention, the step of dividing the development task information according to a preset division rule to obtain a plurality of pieces of subtask information may include:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
dividing the development task information based on the coding levels to obtain a plurality of target task information, wherein one coding level corresponds to one target task information;
determining a service type corresponding to each target task information;
and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
In one implementation of the present invention, after the step of generating the program, the method may further include:
receiving a packing task instruction, determining a program to be packed contained in the packing task instruction from programs corresponding to the subtask information, and sending the program to be packed to a packing server so that the packing server packs and deploys the program to be packed.
Fig. 8 is a schematic structural diagram of a program packaging deployment system according to an embodiment of the present invention, where the system includes a code management server 801 and a packaging server 802, where,
the code management server 801 is configured to obtain development task information, divide the development task information according to a preset division rule to obtain a plurality of pieces of subtask information, receive a code written by a developer based on the subtask information, generate a program corresponding to the subtask information, receive a packing task instruction, determine a program to be packed included in the packing task instruction from the program corresponding to the subtask information, and send the program to be packed to the packing server 802;
the packaging server 802 is configured to receive the program to be packaged, and perform packaging deployment on the program to be packaged.
In the implementation of the invention, a code management server obtains development task information, divides the development task information according to a preset division rule to obtain a plurality of subtask information, receives a code compiled by a developer based on the subtask information, generates a program corresponding to the subtask information, receives a packing task instruction, determines a program to be packed contained in the packing task instruction from the program corresponding to the subtask information, and sends the program to be packed to a packing server, and the packing server packs and deploys the program to be packed. According to the invention, after the code management server obtains the development task information, the development task information is divided according to the preset division rule, so that the artificial division is avoided, the division period is shortened, developers can quickly obtain the subtask information of the developers, the development starting time of the developers is short, then the codes compiled by the developers based on the subtask information are received, the program corresponding to the subtask information is generated, and the development period is shortened. And when receiving the packaging task instruction, sending the program to be packaged contained in the packaging task instruction to a packaging server so that the packaging server packages and deploys the program to be packaged.
In an embodiment of the present invention, the code management server may specifically be configured to:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
and dividing the development task information based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
In an embodiment of the present invention, the code management server may specifically be configured to:
determining a service type corresponding to the development task information;
and dividing the development task information based on the service type to obtain a plurality of subtask information.
In an embodiment of the present invention, the code management server may specifically be configured to:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
In an embodiment of the present invention, the code management server may specifically be configured to:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
dividing the development task information based on the coding layers to obtain a plurality of target task information, wherein one coding layer corresponds to one target task information;
determining a service type corresponding to each target task information;
and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
In one embodiment of the invention, the system can further comprise a test server;
the packaging server 802 is specifically configured to receive the program to be packaged, package the code of the program to be packaged based on a preset packaging rule to obtain a program package to be tested, and deploy the program package to be tested to a test server;
the test server is used for receiving the program to be tested and testing the program to be tested.
In an embodiment of the present invention, the packaging server 802 is further configured to receive a page file corresponding to the task to be packaged and sent by the code management server after the to-be-tested program package is deployed to a test server, and deploy the page file to the test server;
the test server is also used for receiving the page file and testing the page file.
In an embodiment of the present invention, the packaging server 802 is specifically configured to determine a service type of the program to be packaged;
under the condition that the service type of the program to be packaged is a single service type, integrally packaging the codes of the program to be packaged to obtain a program package to be tested;
and when the service type of the program to be packaged is a multi-service type, integrally packaging the codes of the program to be packaged to obtain a target program package, unpacking the target program package based on the service type of the service included in the program to be packaged to obtain the program package to be tested, or unpacking the target program package based on the attribute information of the service included in the program to be packaged to obtain the program package to be tested.
In an embodiment of the present invention, the packaging server 802 is specifically configured to determine a service type of each service included in the program to be packaged, and split a code of a service of the same service type in the target package into one program package to be tested.
In an embodiment of the present invention, the packaging server 802 is specifically configured to determine attribute information of services included in the program to be packaged, determine a correlation between the services based on the attribute information, and split a code of a service whose correlation is greater than a preset threshold in an object package into one package to be tested.
In one embodiment of the invention, the system further comprises a code library;
the packaging server 802 is further configured to send the code of the program to be packaged to the code library after obtaining the code of the program to be packaged corresponding to the task to be packaged;
and the code library is used for receiving the codes of the programs to be packaged and storing the codes of the programs to be packaged.
Because there is a dependency relationship between the codes developed by the developers, that is, the codes developed by a certain developer and other developers may need to obtain the codes and develop the codes on the basis of the codes, the packaging server may send the codes of the programs to be packaged to the code base after obtaining the codes of the programs to be packaged corresponding to the tasks to be packaged, and the code base receives the codes of the programs to be packaged and stores the codes of the programs to be packaged. Here, the code library is a dependent library.
Therefore, a code base is provided for the next development and use by sending the codes of the program to be packaged to the code library.
In one embodiment of the invention, the code management server is equipped with a version management SVN system.
In one embodiment of the present invention, the test server is plural;
the packaging server 802 is specifically configured to determine a target function corresponding to the program to be packaged, determine a test server corresponding to the target function according to a preset corresponding relationship between functions and the test server, and deploy the program package to be tested to the test server corresponding to the target function.
In one embodiment of the invention, the test server comprises a plurality of test server clusters;
the packaging server is specifically configured to determine a target function corresponding to the program package to be tested, determine a test server cluster corresponding to the target function according to a preset corresponding relationship between functions and the test server cluster, and deploy the program package to be tested to the test server cluster corresponding to the target function.
In one embodiment of the invention, the system further comprises a publishing server;
the packaging server is further used for sending the program package to be tested to the issuing server after the program package to be tested is obtained through packaging;
the release server is used for receiving the program packages to be tested and carrying out production deployment on the program packages to be tested.
In order to upload the program package, the embodiment of the invention is also provided with the publishing server, and because sometimes developers only need to make small changes aiming at minor problems, the purposes of quick uploading and quick application can be achieved, at the moment, after the packaging server packages the codes of the program to be packaged to obtain the program package to be tested, the program package to be tested can be directly sent to the publishing server without testing, and the publishing server can carry out production and deployment on the program package to be tested after receiving the program package to be tested.
The mode of directly carrying out production and deployment without testing can achieve the purpose of rapid online, so that the method can be suitable for small application scenes or environments with high tolerance on stability, such as: a corporate internal system.
For example: assuming that the packaging server packages the codes of the program to be packaged to obtain the program package to be tested as a program package A, after the packaging server packages the program package A, the packaging server sends the program package A to the issuing server, and the issuing server receives the program package A and performs production deployment on the program package A.
Therefore, the packaging server can directly send the program packages to be tested to the publishing server without testing after the program packages to be tested are obtained through packaging, so that the purposes of quick online and quick application are achieved.
In one embodiment of the invention, the system further comprises a publishing server;
the test server is also used for deploying the program package which is tested successfully to the release server;
and the release server is used for receiving the successfully tested program package and carrying out production deployment on the successfully tested program package.
In order to upload the program package, the embodiment of the invention is also provided with the publishing server, and the probability of the program causing problems can be reduced because the program package which is tested successfully is published, so after the packaging server packages the codes of the program to be packaged to obtain the program package to be tested, the packaging server sends the program package to be tested to the testing server.
The testing server tests the program package to be tested, generates a testing index result aiming at the program package to be tested, compares the generated testing index result with a testing success standard result formulated according to project requirements, if the testing index result meets the testing success standard result, the testing index result meets the requirements of the project, at the moment, the testing is successful, the program package to be tested is determined to be the program package which is tested successfully, the testing server sends the program package which is tested successfully to the issuing server, the issuing server receives the program package which is tested successfully, and the program package which is tested successfully is produced and deployed to be updated to be on line.
If the test index result does not accord with the test success standard result, the test index result does not accord with the requirement of the item, and the test fails, the program package which fails to be tested is not produced and deployed.
For example: if the packaging server packages the codes of the program to be packaged to obtain a program package to be tested, namely a program package A, the packaging server sends the program package A to the test server after packaging to obtain the program package A;
the test server receives the program package A, tests the program package A, generates a test index result aiming at the program package A, and compares the generated test index result with a test success standard result formulated according to project requirements;
assuming that the test index result is in accordance with the test success standard result, determining the program package A as a successfully tested program package, and sending the successfully tested program package A to the issuing server by the test server;
and the issuing server receives the successfully tested program package A and carries out production deployment on the successfully tested program package A.
Therefore, after the program package to be tested is obtained through packaging, the packaging server can send the program package to be tested to the testing server, and the testing server sends the program package which is tested successfully to the issuing server, so that the stability of program online is guaranteed.
When a product is released, the release server needs to release the product to multiple platforms, and if there is one release server, the release server needs to be responsible for releasing the product to all the platforms, so that the load of the release server is large, and the processing efficiency is low.
Therefore, the processing speed is improved by setting the plurality of publishing servers.
For a better understanding of the embodiments of the present invention, the following description is given by way of a specific example:
for example: as shown in fig. 9, the program packaging deployment system includes a packaging server 901, a test server 902, a task management server 903, a code management server 904, a code library 905, a publishing server 906, and a database 907;
the program packaging deployment system is used for packaging deployment, and the processes of test deployment and production deployment are as follows:
1. a plurality of developers download the dependent codes from a code library 905, wherein the code library is a database for placing source codes developed by other developers, and the dependent codes are codes stored in the code library;
2. a plurality of developers carry out common coding based on project requirements, task allocation and downloaded dependent codes, and submit codes written by the common coding to the code management server 904 to generate tasks;
3. the management personnel determine the tasks to be packaged from the tasks based on the requirements of the development projects, send management instructions to the task management server 903, and the task management server 903 receives the management instructions of the management personnel and generates task numbers to be packaged, wherein the management instructions carry the tasks to be packaged.
4. The manager sends a task instruction to the packaging server 901;
5. after receiving the task instruction, the packaging server 901 obtains the task number to be packaged included in the task instruction from the task management server 903, and displays the task number to be packaged in the task bar to be packaged of the packaging deployment interface.
6. The packaging server 901 obtains the codes of the program to be packaged corresponding to the task numbers to be packaged from the code management server 904, and packages the codes of the program to be packaged based on a preset packaging rule to obtain a program package to be tested;
7. deploying a program package to be tested to a test server 902, testing the program package to be tested by the test server 902 to generate a test index result aiming at the program package to be tested, comparing the generated test index result with a test success standard result formulated according to project requirements, determining the program package to be tested as the program package which is tested successfully if the test index result is in line with the test success standard result, and not performing production deployment on the program package which is tested successfully if the test index result is not in line with the test success standard result and the test is failed;
8. the packaging server 901 sends the codes of the programs to be packaged to the code library 905, and the code library 905 stores the codes of the programs to be packaged.
9. The packing server 901 records compiled and packed information including the execution date, the executive staff and the execution situation of the task to be packed and a program package to be tested to a database 907, and the database 907 stores the compiled and packed information and the program package to be tested, wherein the compiled and packed information can be recorded in a log form;
10. the test server 902 deploys the successfully tested program package to the publishing server 906, and the publishing server 906 receives the successfully tested program package and performs production deployment on the successfully tested program package.
11. The user accesses the application after it is online.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (30)

1. A program generation method applied to a code management server, the method comprising:
acquiring development task information;
dividing the development task information according to a preset division rule to obtain a plurality of subtask information;
receiving a code compiled by a developer based on the subtask information, and generating a program corresponding to the subtask information;
the dividing the development task information according to a preset dividing rule to obtain a plurality of subtask information includes:
dividing the development task information based on preset coding architecture information and/or the service type of the development task information to obtain a plurality of subtask information; wherein the preset encoding architecture information includes: the type of the coding architecture, the number of coding layers contained in the coding architecture and the characteristic information of each layer of coding layer; the service type of the development task information is as follows: the development task information relates to the service types corresponding to the multiple services; the coding architecture comprises a two-layer architecture and a three-layer architecture, wherein the two-layer architecture comprises: a user interface layer and a service logic layer; the three-layer architecture includes: a presentation layer, an intermediate layer and a data layer;
the dividing the development task information based on the preset coding architecture information and the service type of the development task information to obtain a plurality of subtask information includes:
dividing the development task information based on preset coding architecture information to obtain a plurality of target task information; and dividing each target task information based on the service type corresponding to each target task information to obtain a plurality of subtask information.
2. The method according to claim 1, wherein the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information comprises:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
and dividing the development task information based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
3. The method according to claim 1, wherein the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information includes:
determining a service type corresponding to the development task information;
and dividing the development task information based on the service type to obtain a plurality of subtask information.
4. The method according to claim 3, wherein the step of dividing the development task information based on the service type to obtain a plurality of subtask information comprises:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
5. The method according to claim 1, wherein the step of dividing the development task information according to a preset division rule to obtain a plurality of subtask information comprises:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
dividing the development task information based on the coding levels to obtain a plurality of target task information, wherein one coding level corresponds to one target task information;
determining a service type corresponding to each target task information;
and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
6. The method according to claim 1, wherein after the step of generating the program corresponding to the subtask information, the method further comprises:
receiving a packing task instruction, determining a program to be packed contained in the packing task instruction from programs corresponding to the subtask information, and sending the program to be packed to a packing server so that the packing server packs and deploys the program to be packed.
7. A program generation apparatus applied to a code management server, the apparatus comprising:
the acquisition module is used for acquiring development task information;
the dividing module is used for dividing the development task information according to a preset dividing rule to obtain a plurality of subtask information;
the receiving module is used for receiving a code compiled by a developer based on the subtask information and generating a program corresponding to the subtask information;
the dividing module is specifically configured to divide the development task information based on preset coding architecture information and/or a service type of the development task information to obtain a plurality of subtask information; wherein the preset coding architecture information comprises: the type of the coding architecture, the number of coding layers contained in the coding architecture and the characteristic information of each layer of coding layer; the service type of the development task information is as follows: the development task information relates to the service types corresponding to the multiple services; the coding architecture comprises a two-layer architecture and a three-layer architecture, wherein the two-layer architecture comprises: a user interface layer and a service logic layer; the three-layer architecture comprises: a presentation layer, an intermediate layer and a data layer;
the dividing module is specifically configured to divide the development task information based on preset coding architecture information to obtain a plurality of target task information; and dividing each target task information based on the service type corresponding to each target task information to obtain a plurality of subtask information.
8. The apparatus of claim 7, wherein the partitioning module comprises:
a first preset coding architecture information obtaining unit, configured to obtain preset coding architecture information;
a first coding level determining unit, configured to determine a coding level included in the preset coding architecture information;
the first dividing unit is used for dividing the development task information based on the coding layers to obtain a plurality of subtask information, wherein one coding layer corresponds to one subtask information.
9. The apparatus of claim 7, wherein the partitioning module comprises:
the first service type determining unit is used for determining the service type corresponding to the development task information;
and the second dividing unit is used for dividing the development task information based on the service type to obtain a plurality of subtask information.
10. The apparatus according to claim 9, wherein the second partitioning unit is specifically configured to:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
11. The apparatus of claim 7, wherein the partitioning module comprises:
a second preset coding architecture information obtaining unit, configured to obtain preset coding architecture information;
a second coding level determining unit, configured to determine a coding level included in the preset coding architecture information;
the third dividing unit is used for dividing the development task information based on the coding layers to obtain a plurality of target task information, wherein one coding layer corresponds to one target task information;
the second service type determining unit is used for determining the service type corresponding to each target task information;
and the fourth dividing unit is used for dividing each target task information based on the determined service type to obtain a plurality of subtask information.
12. The apparatus of claim 7, further comprising:
and the instruction receiving module is used for receiving a packing task instruction after the program is generated, determining a program to be packed contained in the packing task instruction from the program corresponding to the subtask information, and sending the program to be packed to a packing server so that the packing server packs and deploys the program to be packed.
13. An electronic device comprising a processor and a memory;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 6 when executing a program stored in a memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
15. A program generation system is characterized by comprising a code management server and a packaging server;
the code management server is used for obtaining development task information, dividing the development task information according to a preset dividing rule to obtain a plurality of subtask information, receiving a code compiled by a developer based on the subtask information, generating a program corresponding to the subtask information, receiving a packing task instruction, determining a program to be packed contained in the packing task instruction from the program corresponding to the subtask information, and sending the program to be packed to the packing server;
the packaging server is used for receiving the program to be packaged and packaging and deploying the program to be packaged;
the code management server is specifically used for dividing the development task information based on preset coding architecture information and/or the service type of the development task information to obtain a plurality of subtask information; wherein the preset coding architecture information comprises: the type of the coding architecture, the number of coding layers contained in the coding architecture and the characteristic information of each layer of coding layer; the service type of the development task information is as follows: the development task information is related to the service types corresponding to the multiple services; the coding architecture comprises a two-tier architecture and a three-tier architecture, the two-tier architecture comprising: a user interface layer and a service logic layer; the three-layer architecture includes: a presentation layer, an intermediate layer and a data layer;
the code management server is specifically used for dividing the development task information based on preset coding architecture information to obtain a plurality of target task information; and dividing each target task information based on the service type corresponding to each target task information to obtain a plurality of subtask information.
16. The program generation system of claim 15, wherein the code management server is specifically configured to:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
and dividing the development task information based on the coding levels to obtain a plurality of subtask information, wherein one coding level corresponds to one subtask information.
17. The program generation system of claim 15, wherein the code management server is specifically configured to:
determining a service type corresponding to the development task information;
and dividing the development task information based on the service type to obtain a plurality of subtask information.
18. The program generation system according to claim 17, wherein the code management server is specifically configured to:
determining that the service type corresponds to one piece of subtask information under the condition that the service type belongs to a single service type;
and under the condition that the service type belongs to multiple service types, determining that the service type corresponds to one piece of subtask information, or determining that each service type included in the service type corresponds to one piece of subtask information respectively, wherein the multiple service types are at least two service types.
19. The program generation system according to claim 15, wherein the code management server is specifically configured to:
acquiring preset coding architecture information;
determining a coding layer included by the preset coding architecture information;
dividing the development task information based on the coding layers to obtain a plurality of target task information, wherein one coding layer corresponds to one target task information;
determining a service type corresponding to each target task information;
and dividing each target task information based on the determined service type to obtain a plurality of subtask information.
20. The program generation system according to claim 15, further comprising a test server;
the packaging server is specifically used for receiving the program to be packaged, packaging the code of the program to be packaged based on a preset packaging rule to obtain a program package to be tested, and deploying the program package to be tested to the test server;
the test server is used for receiving the program to be tested and testing the program to be tested.
21. The program generation system according to claim 20, wherein the packaging server is further configured to receive a pagefile corresponding to the task to be packaged and sent by the code management server after the package to be tested is deployed to the test server, and deploy the pagefile to the test server;
the test server is also used for receiving the page file and testing the page file.
22. The program generation system according to claim 20, wherein the packaging server is specifically configured to determine a service type of the program to be packaged;
under the condition that the service type of the program to be packaged is a single service type, integrally packaging the codes of the program to be packaged to obtain a program package to be tested;
and when the service type of the program to be packaged is a multi-service type, integrally packaging the codes of the program to be packaged to obtain a target program package, unpacking the target program package based on the service type of the service included in the program to be packaged to obtain the program package to be tested, or unpacking the target program package based on the attribute information of the service included in the program to be packaged to obtain the program package to be tested.
23. The program generating system of claim 22, wherein the packaging server is specifically configured to determine a service type of each service included in the program to be packaged, and split a code of a service of a same service type in the target package into one package to be tested.
24. The program generating system of claim 23, wherein the packaging server is specifically configured to determine attribute information of services included in the program to be packaged, determine correlations between the services based on the attribute information, and split a code of a service whose correlation is greater than a preset threshold in the target package into one package to be tested.
25. The program generation system according to claim 20, further comprising a code library;
the packaging server is further used for sending the codes of the programs to be packaged to the code base after the codes of the programs to be packaged corresponding to the tasks to be packaged are obtained;
and the code library is used for receiving the codes of the programs to be packaged and storing the codes of the programs to be packaged.
26. The program generation system according to claim 15, wherein the code management server is installed with a version management SVN system.
27. The program generation system of claim 20, wherein the test server is plural;
the packaging server is specifically configured to determine a target function corresponding to the program to be packaged, determine a test server corresponding to the target function according to a preset corresponding relationship between functions and the test server, and deploy the program package to be tested to the test server corresponding to the target function.
28. The program generation system of claim 20, wherein the test server comprises a plurality of test server clusters;
the packaging server is specifically configured to determine a target function corresponding to the program package to be tested, determine a test server cluster corresponding to the target function according to a preset corresponding relationship between functions and the test server cluster, and deploy the program package to be tested to the test server cluster corresponding to the target function.
29. The program generation system according to claim 20, further comprising a publication server;
the test server is also used for deploying the program package which is successfully tested to the release server;
and the release server is used for receiving the successfully tested program package and carrying out production deployment on the successfully tested program package.
30. The program generation system according to claim 20, further comprising a publication server;
the packaging server is further used for sending the program package to be tested to the issuing server after the program package to be tested is obtained through packaging;
the release server is used for receiving the program packages to be tested and carrying out production deployment on the program packages to be tested.
CN201810712583.9A 2018-06-29 2018-06-29 Program generation method, device and system, electronic equipment and storage medium Active CN108920139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810712583.9A CN108920139B (en) 2018-06-29 2018-06-29 Program generation method, device and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810712583.9A CN108920139B (en) 2018-06-29 2018-06-29 Program generation method, device and system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108920139A CN108920139A (en) 2018-11-30
CN108920139B true CN108920139B (en) 2023-02-07

Family

ID=64424533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810712583.9A Active CN108920139B (en) 2018-06-29 2018-06-29 Program generation method, device and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108920139B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800965B (en) * 2018-12-28 2021-12-17 广州亚信技术有限公司 Process business processing method and device, computer equipment and storage medium
CN111506315A (en) * 2019-01-31 2020-08-07 广州数控网络科技有限公司 Code deployment method for flexible digital control and digital control platform
CN110795143B (en) * 2019-10-22 2023-11-07 中国工商银行股份有限公司 Method, apparatus, computing device, and medium for processing functional modules
CN111026371B (en) * 2019-12-11 2023-09-29 上海米哈游网络科技股份有限公司 Game development method and device, electronic equipment and storage medium
CN112000316B (en) * 2020-08-25 2021-08-27 橙色云互联网设计有限公司 Full-factor open type collaborative research and development system and method
CN113778842A (en) * 2020-08-25 2021-12-10 北京沃东天骏信息技术有限公司 Fault-tolerant test method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392766A (en) * 2017-07-25 2017-11-24 上海壹账通金融科技有限公司 Method for processing business, adapter and computer-readable recording medium
CN107832042A (en) * 2017-11-16 2018-03-23 南京轩世琪源软件科技有限公司 One kind is based on embedded software development method
CN107943476A (en) * 2017-11-17 2018-04-20 南京轩世琪源软件科技有限公司 A kind of computer interlocking software development approach based on model-driven
CN107992291A (en) * 2017-11-16 2018-05-04 上海南潮信息科技有限公司 Ruff OS Internet of Things operating systems applied to built-in application program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7590997B2 (en) * 2004-07-30 2009-09-15 Broadband Itv, Inc. System and method for managing, converting and displaying video content on a video-on-demand platform, including ads used for drill-down navigation and consumer-generated classified ads
CN104331294B (en) * 2014-11-05 2017-12-12 中国建设银行股份有限公司 A kind of visualization procedure generation method and device
CN105426197A (en) * 2015-12-30 2016-03-23 北京迪创伟业科技有限公司 Hierarchical design method for embedded product
CN105912461A (en) * 2016-04-05 2016-08-31 浪潮电子信息产业股份有限公司 Test method and system for software agility
CN106445556B (en) * 2016-10-18 2019-08-30 中国银行股份有限公司 A kind of visual code generation method and system
CN107748662A (en) * 2017-11-17 2018-03-02 深圳市泉眼网络科技有限公司 Application development method, terminal and computer-readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392766A (en) * 2017-07-25 2017-11-24 上海壹账通金融科技有限公司 Method for processing business, adapter and computer-readable recording medium
CN107832042A (en) * 2017-11-16 2018-03-23 南京轩世琪源软件科技有限公司 One kind is based on embedded software development method
CN107992291A (en) * 2017-11-16 2018-05-04 上海南潮信息科技有限公司 Ruff OS Internet of Things operating systems applied to built-in application program
CN107943476A (en) * 2017-11-17 2018-04-20 南京轩世琪源软件科技有限公司 A kind of computer interlocking software development approach based on model-driven

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A service-oriented exception handling method based on exception classification;YueHua Ding 等;《PROCEEDINGS OF 2013 International Conference on Sensor Network Security Technology and Privacy Communication System》;20130715;第63-68页 *
用电信息采集***非结构化数据管理设计;祝恩国 等;《电力***及其自动化学报》;20161015;第28卷(第10期);第123-128页 *

Also Published As

Publication number Publication date
CN108920139A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108920139B (en) Program generation method, device and system, electronic equipment and storage medium
CN108897571B (en) Program packaging deployment method, device, system, electronic equipment and storage medium
US10915526B2 (en) Historical data replay utilizing a computer system
US20190155720A1 (en) System and method for testing software applications in a software defined network
CN108959086B (en) Program package testing deployment method, device, system, electronic equipment and storage medium
US9419884B1 (en) Intelligent automated testing method for restful web services
CN105808437B (en) Automatic test method and system based on test case data sheet
US20160188450A1 (en) Automated application test system
US11366713B2 (en) System and method for automatically identifying and resolving computing errors
CN112395196B (en) Data job development test method, device, equipment, system and storage medium
CN111309734B (en) Method and system for automatically generating table data
CN117693734A (en) Front-end item processing method, device, equipment, management system and storage medium
CN107391528B (en) Front-end component dependent information searching method and equipment
CN106990974B (en) APP updating method and device and electronic equipment
CN111538659A (en) Interface testing method and system for service scene, electronic device and storage medium
US11144314B2 (en) Systems and methods for software documentation and code generation management
CN106843822B (en) Execution code generation method and equipment
CN116719735A (en) Test case generation method and device
CN116561003A (en) Test data generation method, device, computer equipment and storage medium
CN115048083A (en) Visualization method and device for assembly, storage medium and electronic equipment
US20220019522A1 (en) Automated sequencing of software tests using dependency information
CN110674110B (en) Bank distributed database construction method and device
US11467949B2 (en) Techniques and architectures for providing an isolated runtime context in a shared environment
US20240027998A1 (en) Resume of failed automates in end-to-end process
CN110858806B (en) Generation method and device of node deployment file, node deployment method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant