Disclosure of Invention
The application provides an application program component configuration method, a storage medium and an electronic device, which are used for solving the technical problems of how to improve the development efficiency of an application program and shorten the development period of the application program.
The application provides an application program component configuration method, which comprises the following steps:
carrying out text analysis on the requirement information of the application program to be developed, and determining component query keywords;
inquiring in a preset component library based on each component inquiry keyword to obtain a candidate component corresponding to each component inquiry keyword and component application information corresponding to the candidate component;
configuring the candidate components based on component application information corresponding to the candidate components and requirement information of the application program to be developed;
and combining the configured candidate components to determine the application program to be developed.
According to the application program component configuration method provided by the application program component configuration method, the component application information comprises at least one of requirement specification information, code storage information, technology implementation information and abnormality solving information.
According to the application program component configuration method provided by the application program, the preset component library is determined based on the following steps:
acquiring a plurality of component templates based on the specified website;
configuring each component template to obtain candidate components corresponding to each component template;
determining component application information corresponding to each candidate component based on the configuration information corresponding to each component template;
and establishing the preset component library based on each candidate component and the component application information corresponding to each candidate component.
According to the application program component configuration method provided by the application program component configuration method, the building of the preset component library based on each candidate component and the component application information corresponding to each candidate component comprises the following steps:
and determining the query keyword of each candidate component based on the requirement specification information and the technology implementation information in the component application information corresponding to each candidate component.
According to the application program component configuration method provided by the application program, the preset component library is determined based on the following steps:
acquiring a historical application program with the same program type as the application program to be developed;
decoupling the historical application program to obtain candidate components corresponding to the historical application program;
determining component application information corresponding to each candidate component based on historical development information corresponding to each candidate component;
and establishing the preset component library based on each candidate component and the component application information corresponding to each candidate component.
According to the application program component configuration method provided by the application program component configuration method, the query is performed in a preset component library based on each component query keyword to obtain candidate components corresponding to each component query keyword, including:
determining semantic similarity between any component query keyword and the query keywords of each candidate component in the preset component library;
and taking the candidate component corresponding to the query keyword with the highest semantic similarity as the candidate component corresponding to the query keyword of any component.
According to the application program component configuration method provided by the application program, the configured candidate components are combined, and the application program to be developed is determined, which comprises the following steps:
determining service execution logic of the application program to be developed based on the requirement information of the application program to be developed;
and based on the service execution logic, combining the configured candidate components to determine the application program to be developed.
The application provides an application program component configuration device, comprising:
the determining unit is used for carrying out text analysis on the requirement information of the application program to be developed and determining component query keywords;
the query unit is used for querying in a preset component library based on each component query keyword to obtain candidate components corresponding to each component query keyword and component application information corresponding to the candidate components;
the configuration unit is used for configuring the candidate components based on the component application information corresponding to the candidate components and the requirement information of the application program to be developed;
and the combination unit is used for combining the configured candidate components and determining the application program to be developed.
The present application provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the application component configuration method.
The application provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the application program component configuration method when executing the program.
According to the application program component configuration method, the storage medium and the electronic device, component query keywords are determined according to the requirement information of the application program to be developed; inquiring in a preset component library according to each component inquiry keyword to obtain a candidate component corresponding to each component inquiry keyword and component application information corresponding to the candidate component; configuring the candidate components according to component application information corresponding to the candidate components and requirement information of an application program to be developed; the configured candidate components are combined to determine the application program to be developed, and the candidate components are obtained by inquiring in a preset component library, so that the purpose of selecting the existing components to rapidly develop the application program is achieved, developers do not need to spend a long time to select among various technical schemes, the technical test time of the developers is saved, the development efficiency of the application program is improved, and the development period of the application program is shortened.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like herein are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is one of the flow diagrams of the application component configuration method provided in the present application, and as shown in fig. 1, the method includes step 110, step 120, step 130, and step 140.
And 110, carrying out text analysis on the requirement information of the application program to be developed, and determining component query keywords.
Specifically, the application program component configuration method provided by the embodiment of the application program component configuration method is suitable for application program component configuration of a computer terminal and a mobile terminal. An application to be developed refers to a computer program that is developed to run on top of an operating system in order to accomplish a particular task or tasks. For example, the application program to be developed may be an intelligent home appliance monitoring program running on a computer end, or may be a voice control program of an intelligent home appliance running on a mobile terminal.
The requirement information refers to a file describing tasks or functions to be performed or implemented by an application program to be developed. The demand information classifies and decomposes the demands of the users on the application programs into subsystems and functional modules which can be realized by the computer, and the demands of the users are described and explained by using a design language so as to achieve the purpose of guiding the program design.
Component technology has evolved on the basis of object-oriented technology. A component is a functional part of a software system that can be integrated with other components to form a larger part or a complete application. Meanwhile, the component is also a replaceable unit and can form a plug-and-play software component of the software system. Thus, software systems employing component technology are easier to develop and have greater flexibility.
The keywords may be queried by components, which may result in components that may be used to build an application to be developed. The component inquiry keywords are used for describing technical implementation means, technical application platforms, technical implementation functions and the like of the components, and are convenient for quickly searching the components.
The requirement information of the application program to be developed can be subjected to text analysis, so that a plurality of component query keywords can be obtained. The text analysis method can be used for counting word frequencies of documents (requirement specifications or design specifications) corresponding to the requirement information of the application program to be developed, and words with word frequencies exceeding a preset number are used as query keywords. For example, statistics is performed on each functional vocabulary in the design specification of the voice control program of the intelligent household electrical appliance to obtain high-frequency vocabulary, including "voice acquisition", "voice recognition", and the like, and these vocabularies can be used as component query keywords.
Step 120, based on the query keyword of each component, querying in a preset component library to obtain a candidate component corresponding to the query keyword of each component and component application information corresponding to the candidate component.
Specifically, the component application information is used to describe an application method and application notice of the component, and the like.
The preset component library may include a plurality of candidate components, and component application information corresponding to each candidate component. Each candidate component may be obtained through a public code library or through an application that has been developed. For example, a preset component library can be established by searching a part of the open source code library to obtain various open source components. For another example, the components used by the developed application may be consolidated to create a library of preset components.
Component application information, which may be embodied in text form. Any component query keyword is queried in a preset component library, and the component corresponding to the component application information with the highest matching degree can be used as a candidate component corresponding to the component query keyword by matching the component query keyword with the component application information of each component in the preset component library.
According to the method, the candidate components corresponding to the query keywords of each component and the component application information corresponding to the candidate components can be obtained.
And 130, configuring the candidate components based on the component application information corresponding to the candidate components and the requirement information of the application program to be developed.
Specifically, the candidate component is not directly available after it is obtained. And the candidate components are required to be configured correspondingly according to the component application information corresponding to the candidate components and the requirement information of the application program to be developed.
For example, the component application information of the candidate component records the programming language applicable to the component, and if the programming language is inconsistent with the programming language environment of the application program to be developed, the candidate component needs to be configured in language environment so as to be applicable to the programming language environment of the application program to be developed.
For another example, if the component application information of the candidate component describes that the component may have an application fault in the use process, the program code of the candidate component needs to be modified.
For another example, the component application information of the candidate component records the functions that can be implemented by the component, and if the functions are different from the requirement information of the application to be developed, the candidate component needs to be improved according to the requirement information of the application to be developed, for example, the program interface of the candidate component is added.
And 140, combining the configured candidate components to determine an application program to be developed.
Specifically, the configured candidate components can be applied to the application program to be developed, and the configured candidate components can be combined, so that the development of the application program to be developed is completed.
For example, according to the business flow of the application program to be developed, each configured candidate component can be combined, the combined result is converted into a program code, and after packaging, the program code corresponding to the application program to be developed, which can be executed, is obtained.
According to the application program component configuration method, component query keywords are determined according to the requirement information of the application program to be developed; inquiring in a preset component library according to each component inquiry keyword to obtain a candidate component corresponding to each component inquiry keyword and component application information corresponding to the candidate component; configuring the candidate components according to component application information corresponding to the candidate components and requirement information of an application program to be developed; the configured candidate components are combined to determine the application program to be developed, and the candidate components are obtained by inquiring in a preset component library, so that the purpose of selecting the existing components to rapidly develop the application program is achieved, developers do not need to spend a long time to select among various technical schemes, the technical test time of the developers is saved, the development efficiency of the application program is improved, and the development period of the application program is shortened.
Based on the above-described embodiments, the component application information includes at least one of demand description information, code storage information, technology implementation information, and abnormality solving information.
Specifically, the requirement specification information is information describing functions and the like that can be realized by the component. For example, the requirement specification information may include functions that the component can implement, a data format that can be read.
The code storage information is used for recording information such as storage position and acquisition mode of program codes of the components. For example, the code storage information may include a network location or a hard disk location where the program code of the component is stored.
The technology implementation information is used for recording information such as programming environments, implementation steps and the like required to be adopted for realizing the components. For example, the technical implementation information may include a programming language adopted by the component, a logic flow chart written in the programming language, and the like, and may further include technical advantages and technical disadvantages of the component.
The abnormality solving information is used for recording information such as a debugging method when an abnormality occurs in the operation of the component. For example, the exception resolution information may include technical problems encountered by a technician in developing the component, solutions to these technical problems, and the like.
Based on any of the above embodiments, the preset component library is determined based on the following steps:
acquiring a plurality of component templates based on the specified website;
configuring each component template to obtain candidate components corresponding to each component template;
determining component application information corresponding to each candidate component based on the configuration information corresponding to each component template;
and establishing a preset component library based on each candidate component and the component application information corresponding to each candidate component.
In particular, components may be obtained from the disclosed code base. Multiple component templates may be obtained from a specified website. The designated website may be a public program development sharing website or a program development technology forum website.
And downloading a plurality of component templates from the appointed websites, and configuring the component templates to obtain candidate components corresponding to each component template. The manner of configuration may be to instantiate a template.
And recording configuration information in the instantiation of the component template to obtain component application information corresponding to each candidate component. And then, sorting the candidate components and the component application information corresponding to each candidate component to obtain a preset component library.
The preset component library may be embodied in the form of a component query manual, which may be stored in the form of data in an electronic database.
Based on any of the above embodiments, based on each candidate component and component application information corresponding to each candidate component, establishing a preset component library includes:
and determining the query keyword of each candidate component based on the requirement specification information and the technology implementation information in the component application information corresponding to each candidate component.
Specifically, in order to improve the query efficiency of the components and reduce the query time, the query keywords of each candidate component may be predetermined.
The query keyword of each candidate component can be determined according to the requirement description information and the technology implementation information in the component application information corresponding to each candidate component.
For example, if the requirement specification information in the component application information corresponding to the candidate component records that the main function of the candidate component is to be used for implementing speech recognition, the speech recognition may be used as a query keyword of the candidate component.
For example, if the technology implementation information in the component application information corresponding to the candidate component records that the candidate component is mainly implemented by a JavaScript scripting language, javaScript may be used as a query keyword of the candidate component.
Based on any of the above embodiments, the preset component library is determined based on the following steps:
acquiring a historical application program with the same program type as the application program to be developed;
decoupling the historical application program to obtain candidate components corresponding to the historical application program;
determining component application information corresponding to each candidate component based on historical development information corresponding to each candidate component;
and establishing a preset component library based on each candidate component and the component application information corresponding to each candidate component.
Specifically, the embodiment of the application can also build the preset component library through the history application program.
Firstly, acquiring historical application programs with the same program type as the application programs to be developed, performing program structure analysis on the historical application programs, and decoupling each component forming each historical application program to obtain a plurality of candidate components corresponding to each historical application program.
And secondly, according to the historical development information corresponding to each candidate component, acquiring component application information corresponding to each candidate component after finishing.
And finally, sorting the candidate components and the component application information corresponding to each candidate component to obtain a preset component library.
Based on any of the above embodiments, step 120 includes:
determining semantic similarity between any component query keyword and the query keywords of each candidate component in a preset component library;
and taking the candidate component corresponding to the query keyword with the highest semantic similarity as the candidate component corresponding to the query keyword of any component.
Specifically, any component query keyword may be compared with query keywords of candidate components in a preset component library, so as to determine a candidate component corresponding to the any component query keyword.
The comparison method can be realized by comparing semantic similarity. The semantic similarity calculation method comprises a calculation method based on a vector space model, a calculation method based on a Hamming distance, a calculation method based on semantic understanding and the like.
The higher the semantic similarity, the more likely it is that any component query keyword is the same as the semantic expressed by the query keywords of the candidate components. And the candidate component corresponding to the query keyword with the highest semantic similarity can be used as the candidate component corresponding to the query keyword of any component.
Based on any of the above embodiments, step 140 includes:
determining service execution logic of the application program to be developed based on the requirement information of the application program to be developed;
and combining the configured candidate components based on the service execution logic to determine the application program to be developed.
Specifically, the service execution logic is used to represent a solution step of the technical problem to be solved by the application to be developed.
Take the example of developing a voice control application for intelligent appliances. The configured candidate components may include a speech acquisition component, a speech recognition component, a command determination component, a command transmission component, and a result feedback component. Because the voice control application program comprises the required information such as voice startup, voice shutdown, voice adjustment and the like. The service execution logic corresponding to each function can be determined according to each function in the demand information. And according to the service execution logic, each component is combined and modified, including interfaces among the components, triggering conditions, execution sequence and the like. And combining to obtain the application program to be developed.
For example, the service execution logic of voice startup is "acquire startup voice sent by a user-recognize the voice as a startup command-send the startup command to the intelligent home appliance", and then the voice acquisition component, the voice recognition component and the command sending component may be combined to obtain the voice startup function in the voice control application program of the intelligent home appliance.
Because the program developer can obtain the application program by only combining all the components, the learning threshold of developing the application program is reduced. Meanwhile, the development process of the application program is simplified, and the development efficiency of the application program is improved. In addition, as the components are simply combined without writing codes, the combination relation of the components is only required to be adjusted in the later stage, and therefore the later maintenance cost is lower.
Based on any of the above embodiments, fig. 2 is a second flow chart of the application component configuration method provided in the present application, and as shown in fig. 2, the method is applied to a large-scale program development including a front-end project and a back-end project, and specifically includes:
step 210, the components and the component application information used by the former developers (including front-end developers and back-end developers) in the former application program component configuration are collated; the component application information comprises a developed final effect diagram, a corresponding demand link address, a code base address, implementation steps of technologies used in development, advantages and disadvantages, encountered problems, solutions, processes and problem points of other technology implementations, and the like.
Step 220, building a preset component library (front-end component library and back-end component library) according to the components and the component application information, for example, the preset component library may be embodied in the form of a component quick-look manual.
And 230, searching the related content in a preset component library through keywords, technical keywords of the component, demand names and the like, and quickly referring to the implementation process of the component writing program, so that the component is called, and the configuration of the application program component is completed.
The method can rapidly carry out the configuration of the application program components, avoid excessive and useless manpower consumption and improve the development efficiency; the method has high pertinence, the content is all relevant to the project, and the method is not only used for carding key technical nodes of the project, but also comprises a component library, so that a developer can conveniently locate the later problem, and the collaborative development efficiency is improved.
Based on any of the above embodiments, fig. 3 is a schematic structural diagram of an application component configuration apparatus provided in the present application, as shown in fig. 3, where the apparatus includes:
a determining unit 310, configured to perform text parsing on the requirement information of the application to be developed, and determine component query keywords;
the query unit 320 is configured to query in a preset component library based on each component query keyword, to obtain a candidate component corresponding to each component query keyword, and component application information corresponding to the candidate component;
a configuration unit 330, configured to configure the candidate component based on component application information corresponding to the candidate component and requirement information of an application program to be developed;
and the combining unit 340 is configured to combine the configured candidate components to determine an application program to be developed.
According to the application program component configuration device provided by the embodiment of the application program, component query keywords are determined according to the requirement information of the application program to be developed; inquiring in a preset component library according to each component inquiry keyword to obtain a candidate component corresponding to each component inquiry keyword and component application information corresponding to the candidate component; configuring the candidate components according to component application information corresponding to the candidate components and requirement information of an application program to be developed; the configured candidate components are combined to determine the application program to be developed, and the candidate components are obtained by inquiring in a preset component library, so that the purpose of selecting the existing components to rapidly develop the application program is achieved, developers do not need to spend a long time to select among various technical schemes, the technical test time of the developers is saved, the development efficiency of the application program is improved, and the development period of the application program is shortened.
Based on any of the above embodiments, the component application information includes at least one of demand description information, code storage information, technology implementation information, and abnormality resolution information.
Based on any of the above embodiments, the apparatus further comprises:
the construction unit is used for acquiring a plurality of component templates based on the appointed website;
configuring each component template to obtain candidate components corresponding to each component template;
determining component application information corresponding to each candidate component based on the configuration information corresponding to each component template;
and establishing a preset component library based on each candidate component and the component application information corresponding to each candidate component.
Based on any of the above embodiments, the building unit is further configured to:
and determining the query keyword of each candidate component based on the requirement specification information and the technology implementation information in the component application information corresponding to each candidate component.
Based on any of the above embodiments, the building unit is further configured to:
acquiring a historical application program with the same program type as the application program to be developed;
decoupling the historical application program to obtain candidate components corresponding to the historical application program;
determining component application information corresponding to each candidate component based on historical development information corresponding to each candidate component;
and establishing a preset component library based on each candidate component and the component application information corresponding to each candidate component.
Based on any of the above embodiments, the querying unit is configured to:
determining semantic similarity between any component query keyword and the query keywords of each candidate component in a preset component library;
and taking the candidate component corresponding to the query keyword with the highest semantic similarity as the candidate component corresponding to the query keyword of any component.
Based on any of the above embodiments, the combining unit is configured to:
determining service execution logic of the application program to be developed based on the requirement information of the application program to be developed;
and combining the configured candidate components based on the service execution logic to determine the application program to be developed.
Based on any one of the above embodiments, the present application further provides an application component configuration method. The application program component configuration method is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home equipment ecology, intelligent Home (Intelligence House) ecology and the like. In the present embodiment, the above-described application component configuration method can be applied to a hardware environment constituted by the terminal device 401 and the server 402 as shown in fig. 4. As shown in fig. 4, the server 402 is connected to the terminal device 401 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, to provide data storage services for the server 402, and cloud computing and/or edge computing services may be configured on the server or independent of the server, to provide data operation services for the server 402.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 401 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock and the like.
Based on any one of the foregoing embodiments, fig. 5 is a schematic structural diagram of an electronic device provided in the present application, and as shown in fig. 5, the electronic device may include: processor (Processor) 510, communication interface (Communications Interface) 520, memory (Memory) 530, and communication bus (Communications Bus) 540, wherein Processor 510, communication interface 520, memory 530 complete communication with each other via communication bus 540. Processor 510 may invoke logic commands in memory 530 to perform the following method:
carrying out text analysis on the requirement information of the application program to be developed, and determining component query keywords; inquiring in a preset component library based on each component inquiry keyword to obtain a candidate component corresponding to each component inquiry keyword and component application information corresponding to the candidate component; configuring the candidate components based on component application information corresponding to the candidate components and requirement information of an application program to be developed; and combining the configured candidate components to determine the application program to be developed.
In addition, the logic commands in the memory 530 may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a separate product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several commands for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The processor in the electronic device provided by the embodiment of the present application may call the logic instruction in the memory to implement the above method, and the specific implementation manner of the processor is consistent with the implementation manner of the foregoing method, and may achieve the same beneficial effects, which are not described herein again.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method provided by the above embodiments, the method comprising:
carrying out text analysis on the requirement information of the application program to be developed, and determining component query keywords; inquiring in a preset component library based on each component inquiry keyword to obtain a candidate component corresponding to each component inquiry keyword and component application information corresponding to the candidate component; configuring the candidate components based on component application information corresponding to the candidate components and requirement information of an application program to be developed; and combining the configured candidate components to determine the application program to be developed.
The specific embodiment is consistent with the foregoing method embodiment, and the same beneficial effects can be achieved, and will not be described herein.
Embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements a method as described above, the method comprising:
carrying out text analysis on the requirement information of the application program to be developed, and determining component query keywords; inquiring in a preset component library based on each component inquiry keyword to obtain a candidate component corresponding to each component inquiry keyword and component application information corresponding to the candidate component; configuring the candidate components based on component application information corresponding to the candidate components and requirement information of an application program to be developed; and combining the configured candidate components to determine the application program to be developed.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.