CN109144502A - Method and device for generating application - Google Patents

Method and device for generating application Download PDF

Info

Publication number
CN109144502A
CN109144502A CN201810975793.7A CN201810975793A CN109144502A CN 109144502 A CN109144502 A CN 109144502A CN 201810975793 A CN201810975793 A CN 201810975793A CN 109144502 A CN109144502 A CN 109144502A
Authority
CN
China
Prior art keywords
program segment
application
information
program
generated
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.)
Pending
Application number
CN201810975793.7A
Other languages
Chinese (zh)
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.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810975793.7A priority Critical patent/CN109144502A/en
Publication of CN109144502A publication Critical patent/CN109144502A/en
Pending legal-status Critical Current

Links

Classifications

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

Abstract

The embodiment of the present application discloses method and device for generating application.One specific embodiment of this method includes: the hardware information for obtaining target device;The program segment being adapted in preset program segment set with acquired hardware information is chosen, the program segment in program segment set is for generating the application for running on different target equipment;The application for running on target device is generated based on selected program segment.This embodiment offers a kind of to apply generting machanism based on preset program segment set, and the program segment in program segment set can be multiplexed, to improve using formation efficiency.

Description

Method and device for generating application
Technical field
The invention relates to field of computer technology, more particularly, to generate the method and apparatus of application.
Background technique
Terminal device is numerous currently on the market, wearable device especially developed in recent years, wearable device The hardware such as screen shape, resolution ratio and used processor, memory are had nothing in common with each other, so that application and development policy is to every money Equipment requires individually to carry out primary development.
Summary of the invention
The embodiment of the present application proposes method and device for generating application.
In a first aspect, the embodiment of the present application provides a kind of method for generating application, this method comprises: obtaining target The hardware information of equipment;Choose the program segment being adapted in preset program segment set with acquired hardware information, program segment collection Program segment in conjunction is for generating the application for running on different target equipment;Target is run on based on selected program segment generation The application of equipment.
In some embodiments, before running on the application of target device based on selected program segment generation, method is also It include: the first instruction information for obtaining the first had function of instruction application to be generated;According to the first instruction information, determines and use In the first identifier for the program segment for realizing the first function;Choose the code segment of first identifier instruction in program segment set.
In some embodiments, it is generated and is run on after the application of target device based on selected program segment, method is also It include: the second indication information for obtaining instruction and deleting the second had function of application to be generated;According to second indication information, really The second identifier of the fixed program segment for realizing the second function;Delete the code segment that second identifier indicates in application generated.
In some embodiments, hardware information includes screen message, and screen message includes screen shape information and/or screen Resolution information;And choose the program segment being adapted in preset program segment set with acquired hardware information, comprising: according to The corresponding pass of pre-set screen message and the program segment of the interface parameter in program segment set for determining application to be generated System chooses program segment corresponding with screen message in program segment set.
In some embodiments, hardware information further includes at least one of following: processor information, storage space information, electricity Tankage information;And according to the interface ginseng for being used to determine application to be generated in pre-set screen message and program segment set The corresponding relationship of several program segments chooses program segment corresponding with screen message in program segment set, comprising: according to hardware information Determine the processing capacity information of the processing capacity of characterization target device;According in pre-set screen message and program segment set In corresponding relationship and pre-set and program segment set for determining the program segment of the interface parameter of application to be generated The matched processing capacity information of program segment, choose it is corresponding with screen message in program segment set, and with the processing capacity determined The program segment of information matches.
Second aspect, the embodiment of the present application provide it is a kind of for generate application device, which includes: the first acquisition Unit is configured to obtain the hardware information of target device;First selection unit is configured to choose preset program segment set In the program segment that is adapted to acquired hardware information, program segment in program segment set runs on different target and sets for generating Standby application;Generation unit is configured to generate the application for running on target device based on selected program segment.
In some embodiments, device further include: second acquisition unit is configured to obtain instruction application to be generated and is had First instruction information of the first standby function;First determination unit, be configured to according to first instruction information, determine for realizing The first identifier of the program segment of first function;Second selection unit is configured to choose first identifier in program segment set and indicates Code segment.
In some embodiments, it is generated and is run on after the application of target device based on selected program segment, device is also Include: third acquiring unit, is configured to obtain the second instruction letter that the second had function of application to be generated is deleted in instruction Breath;Second determination unit is configured to determine the second mark of the program segment for realizing the second function according to second indication information Know;Unit is deleted, is configured to delete the code segment that second identifier indicates in application generated.
In some embodiments, hardware information includes screen message, and screen message includes screen shape information and/or screen Resolution information;And first selection unit, it is further configured to according to pre-set screen message and program segment set In for determine application to be generated interface parameter program segment corresponding relationship, choose program segment set in screen message pair The program segment answered.
In some embodiments, hardware information further includes at least one of following: processor information, storage space information, electricity Tankage information;And first selection unit, comprising: determine subelement, be configured to determine characterization target according to hardware information The processing capacity information of the processing capacity of equipment;Subelement is chosen, is configured to according to pre-set screen message and program For determining the corresponding relationship and pre-set and program segment of the program segment of the interface parameter of application to be generated in Duan Jihe The matched processing capacity information of program segment in set, choose it is corresponding with screen message in program segment set, and with determine The program segment of processing capacity information matches.
The third aspect, the embodiment of the present application provide a kind of equipment, comprising: one or more processors;Storage device, On be stored with one or more programs, when said one or multiple programs are executed by said one or multiple processors so that on It states one or more processors and realizes such as the above-mentioned method of first aspect.
Fourth aspect, the embodiment of the present application provide a kind of computer-readable medium, are stored thereon with computer program, should Such as first aspect above-mentioned method is realized when program is executed by processor.
Method and device for generating application provided by the embodiments of the present application, the hardware by obtaining target device are believed Breath, then chooses the program segment being adapted in preset program segment set with acquired hardware information, finally based on selected Program segment generates the application for running on target device, provides a kind of application generting machanism based on preset program segment set, Program segment in program segment set can be multiplexed, to improve using formation efficiency.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for generating application of the application;
Fig. 3 is a schematic diagram according to the application scenarios of the method for generating application of the application;
Fig. 4 is the flow chart according to another embodiment of the method for generating application of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for generating application of the application;
Fig. 6 is adapted for the structural schematic diagram of the computer system for the server or terminal of realizing the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using the method for generating application of the application or the implementation of the device for generating application The exemplary system architecture 100 of example.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..It can be equipped on terminal device 101,102,103 at various client applications, such as communication class application, image Manage class application, e-commerce application, searching class application etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, can be the various electronic equipments with display screen, including but not limited to wearable device, smart phone, tablet computer, Pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is software, may be mounted at above-mentioned In cited electronic equipment.Multiple softwares or software module may be implemented into it, and single software or software also may be implemented into Module.It is not specifically limited herein.The hardware information of terminal device 101,102,103 available its own or other equipment; The program segment being adapted in preset program segment set with acquired hardware information is chosen, the program segment in program segment set is used for Generate the application for running on different target equipment;The application for running on target device is generated based on selected program segment
Server 105 can be to provide the server of various services, such as to installing on terminal device 101,102,103 Using the background server that offer is supported, or for generating and updating the application installed on terminal device 101,102,103 Server, the hardware information of the available target device of server 105 (such as terminal device 101,102,103);It chooses default Program segment set in the program segment that is adapted to acquired hardware information, the program segment in program segment set is for generating operation In the application of different target equipment;The application for running on target device is generated based on selected program segment.
It should be noted that the method provided by the embodiment of the present application for generating application can be held by server 105 Row, can also be executed by terminal device 101,102,103, and correspondingly, the device for generating application can be set in server In 105, also it can be set in terminal device 101,102,103.
It should be noted that server can be hardware, it is also possible to software.When server is hardware, may be implemented At the distributed server cluster that multiple servers form, individual server also may be implemented into.It, can when server is software To be implemented as multiple softwares or software module (such as providing Distributed Services), single software or software also may be implemented into Module.It is not specifically limited herein.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the process of one embodiment of the method for generating application according to the application is shown 200.The method for being used to generate application, comprising the following steps:
Step 201, the hardware information of target device is obtained.
It in the present embodiment, can for generating the method executing subject (such as server shown in FIG. 1 or terminal) of application To obtain the hardware information of target device first.Hardware information may include the information of device screen, the information of processor, storage Device information, battery capacity information, link information etc., wherein the information of device screen may include the resolution ratio of screen, shape Deng, the information of processor may include processor model, nucleus number or other can characterize the information of its processing capacity, memory Information may include the size of memory space, and link information may include the information for the connection type that equipment is supported, such as, if Support the connection types such as bluetooth, NFC (near field communication (NFC), Near Field Communication).Above-mentioned execution The hardware information of the target device of the available user's input of main body can also be set by the acquisition target that interacts with target device The hardware information recorded in standby system.
Step 202, the program segment being adapted in preset program segment set with acquired hardware information is chosen.
In the present embodiment, above-mentioned executing subject can choose in preset program segment set with obtained in step 201 The program segment of hardware information adaptation.Program segment (Program segment) is exactly one section of program, can be a subprocess (SUB), a method in a function (FUNCTION) or Object-oriented Programming Design.Journey in program segment set Sequence section is for generating the application for running on different target equipment, for example, for the parameter for determining the interface of application to be generated Program segment, can store the parameter at the interface for determining application to be generated for rectangular screen in program segment set Program segment, and the interface for circular screen for determining application to be generated parameter program segment;For for realizing to The program segment of specific function in application is generated, can store the journey for the strong target device of processing capacity in program segment set Sequence section, and the program segment for the weak target device of processing capacity.It is pre- that program segment in program segment set can be staff It first writes and to store.
In the present embodiment, above-mentioned executing subject can be according to program in pre-set hardware information and program segment set The corresponding relationship of section, chooses program segment corresponding with acquired hardware information in the pre-set programs section set.On as an example, State the program segment and screen shape information that can store the parameter for determining the interface of application to be generated in executing subject Corresponding relationship is chosen preset if above-mentioned executing subject gets screen shape information target device screen as circle The program segment being adapted in program segment set with target device screen for circular screen shape information.
In addition, the hardware information of the target device of its adaptation, above-mentioned execution can be marked in program segment in the form of annotation etc. Main body may search in pre-set programs section set including acquired hardware information program segment as with acquired hardware information The program segment of adaptation.
Step 203, the application for running on target device is generated based on selected program segment.
In the present embodiment, above-mentioned executing subject can run on target based on the program segment generation chosen in step 202 The application of equipment.Above-mentioned executing subject can combine selected program segment and generate the application for running on target device, combine When can also work in combination personnel write together other program segments.In addition, above-mentioned executing subject may also respond to get For the screening operation of selected program segment, the application for running on target device is generated based on the program segment after screening.
The hardware information that the method provided by the above embodiment of the application passes through acquisition target device;Choose preset program The program segment being adapted in Duan Jihe with acquired hardware information, the program segment in program segment set run on difference for generating The application of target device;The application for running on target device is generated based on selected program segment, is provided a kind of based on default Program segment set apply generting machanism, the program segment in program segment set can be multiplexed, to improve using generating effect Rate.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for generating application of the present embodiment Figure.In the application scenarios of Fig. 3, server 301 obtains the hardware information of target device 32, then chooses preset program segment collection The program segment 304 being adapted in conjunction with acquired hardware information finally runs on target based on the selected generation of program segment 304 The application 305 of equipment.
In some optional implementations of the present embodiment, target device is run on based on selected program segment generation Using before, method further include: obtain the first instruction information of the first had function of instruction application to be generated;According to first It indicates information, determines the first identifier of the program segment for realizing the first function;Choose first identifier instruction in program segment set Code segment.It may include that first identifier or first indicate that in information may include the first function in first instruction information Identification information, above-mentioned executing subject can be according to the corresponding passes of the mark of the identification information and code segment of pre-set function System, determines first identifier.By this implementation, the function that application to be generated has can be increased according to actual needs, into one Step is enriched using the method generated.
In some optional implementations of the present embodiment, target device is run on based on selected program segment generation Using later, method further include: obtain the second indication information that the second had function of application to be generated is deleted in instruction;According to Second indication information determines the second identifier of the program segment for realizing the second function;Delete the second mark in application generated Know the code segment of instruction.It may include in second identifier or second indication information in second indication information may include second The identification information of function, above-mentioned executing subject can be according to pairs of the mark of the identification information and code segment of pre-set function It should be related to, determine second identifier.By this implementation, the function that application to be generated has can be deleted according to actual needs, Reduce the volume for generating application.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for generating application.The use In the process 400 for the method for generating application, comprising the following steps:
Step 401, the hardware information of target device is obtained.
It in the present embodiment, can for generating the method executing subject (such as server shown in FIG. 1 or terminal) of application To obtain the hardware information of target device first.Hardware information may include screen message, and screen message may include screen shape Shape information and/or screen resolution information.
Step 402, according to the interface for being used to determine application to be generated in pre-set screen message and program segment set The corresponding relationship of the program segment of parameter chooses program segment corresponding with screen message in program segment set.
In the present embodiment, above-mentioned executing subject can be used for according in pre-set screen message and program segment set Determine the corresponding relationship of the program segment of the interface parameter of application to be generated, choose in program segment set with obtained in step 401 The corresponding program segment of screen message.
Herein, the interface parameter of application to be generated may include: the journey for being used to indicate application interface background colour to be generated Sequence section, the program segment for being used to indicate the program segment to be generated using dialogue stream pattern, being used to indicate application interaction pattern to be generated, Be used to indicate the program segment to be generated using font, the program segment that is used to indicate applicating text layout to be generated, be used to indicate to It generates the program segment of pattern template used in the interface of application, be used to indicate key patterns in the interface of application to be generated, pendulum Put the program segment of position or keypress function.
As an example, above-mentioned dialogue stream pattern may include record dialogue, only one wheel dialogue of record;Above-mentioned interactive pattern can With include dialog mode with it is pivoted;Above-mentioned pattern template can be instruction key, picture or text template how displayed separately, Be also possible to indicate key, picture, in text two-by-two or triplicity template how displayed separately.For example, in pattern template It can recorde the parameters such as key, picture, the display location of text and size.
In some optional implementations of the present embodiment, hardware information further includes at least one of following: processor information, Storage space information, battery capacity information;And according in pre-set screen message and program segment set for determine to The corresponding relationship of the program segment of the interface parameter of application is generated, program segment corresponding with screen message in program segment set is chosen, It include: the processing capacity information that the processing capacity of characterization target device is determined according to hardware information;According to pre-set screen It is used to determine the corresponding relationship of the program segment of the interface parameter of application to be generated in information and program segment set, and presets With the matched processing capacity information of program segment in program segment set, choose program segment set in it is corresponding with screen message, and With the program segment for the processing capacity information matches determined.Refer to as an example, above-mentioned executing subject gets screen shape information It is circular screen shape letter with target device screen in preset program segment set after showing target device screen for circle Breath adaptation program segment have it is multiple, at this point it is possible to according to the case where wrist-watch hardware can choose low-power consumption version program segment or High power consumption but the better program segment of user experience.
Herein, processing capacity can determine according to preset rules, for example, the target of the processor of preset kind Equipment disposal ability is preset value, and it is default that memory space or battery capacity, which are greater than the target device processing capacity of preset threshold, Value.
Step 403, the application for running on target device is generated based on selected program segment.
In the present embodiment, above-mentioned executing subject can run on target based on the program segment generation chosen in step 402 The application of equipment.
In the present embodiment, step 401, the operation of operation and step 201, the step 203 of step 403 are essentially identical, This is repeated no more.
Figure 4, it is seen that the method for generating application compared with the corresponding embodiment of Fig. 2, in the present embodiment Process 400 in pass through in pre-set screen message and program segment set for determining the interface parameter of application to be generated The corresponding relationship of program segment is chosen program segment corresponding with screen message in program segment set and is further promoted with generating application The interface of application generated shows effect.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind to answer for generating One embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various electronic equipments.
As shown in figure 5, the device 500 for generating application of the present embodiment includes: that first acquisition unit 501, first is selected Take unit 502, generation unit 503.Wherein, first acquisition unit is configured to obtain the hardware information of target wearable device; First selection unit is configured to choose the program segment being adapted in preset program segment set with acquired hardware information, journey Program segment in sequence section set is for generating the application for running on different target equipment;Generation unit is configured to based on selected The program segment taken generates the application for running on target wearable device.
In the present embodiment, for generate the first acquisition unit 501 of device 500 of application, the first selection unit 502, The specific processing of generation unit 503 can be with reference to step 201, the step 202, step 203 in Fig. 2 corresponding embodiment.
In some optional implementations of the present embodiment, device further include: second acquisition unit is configured to acquisition and refers to Show the first instruction information of the first had function of application to be generated;First determination unit is configured to according to the first instruction Information determines the first identifier of the program segment for realizing the first function;Second selection unit is configured to choose program segment collection The code segment that first identifier indicates in conjunction.
In some optional implementations of the present embodiment, it is wearable that target is run on based on selected program segment generation After the application of equipment, device further include: third acquiring unit is configured to obtain instruction and deletes what application to be generated had The second indication information of second function;Second determination unit is configured to be determined according to second indication information for realizing second The second identifier of the program segment of function;Unit is deleted, is configured to delete the code that second identifier indicates in application generated Section.
In some optional implementations of the present embodiment, hardware information includes screen message, and screen message includes screen Shape information and/or screen resolution information;And first selection unit, it is further configured to according to pre-set screen For determining the corresponding relationship of the program segment of the interface parameter of application to be generated in information and program segment set, program segment collection is chosen Program segment corresponding with screen message in conjunction.
In some optional implementations of the present embodiment, hardware information further includes at least one of following: processor information, Storage space information, battery capacity information;And first selection unit, comprising: determine subelement, be configured to be believed according to hardware Breath determines the processing capacity information of the processing capacity of characterization target wearable device;Subelement is chosen, is configured to according in advance For determining the corresponding relationship of the program segment of the interface parameter of application to be generated in the screen message and program segment set of setting, with And the pre-set matched processing capacity information of program segment with program segment set, it chooses in program segment set and believes with screen Breath corresponds to, and the program segment with the processing capacity information matches determined.
The device provided by the above embodiment of the application, by the hardware information for obtaining target device;Choose preset journey The program segment being adapted in sequence section set with acquired hardware information, the program segment in program segment set are run on not for generating With the application of target device;The application for running on target device is generated based on selected program segment, is provided a kind of based on pre- If program segment set apply generting machanism, the program segment in program segment set can be multiplexed, to improve using generating Efficiency.
Below with reference to Fig. 6, it illustrates the server for being suitable for being used to realize the embodiment of the present application or the departments of computer science of terminal The structural schematic diagram of system 600.Server or terminal shown in Fig. 6 are only an example, should not be to the function of the embodiment of the present application Any restrictions can be brought with use scope.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
It can connect with lower component to I/O interface 605: the importation 606 including keyboard, mouse etc.;Including all The output par, c 607 of such as cathode-ray tube (CRT), liquid crystal display (LCD) and loudspeaker etc.;Storage including hard disk etc. Part 608;And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 passes through Communication process is executed by the network of such as internet.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as disk, CD, magneto-optic disk, semiconductor memory etc., are mounted on as needed on driver 610, in order to from The computer program read thereon is mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer-readable medium either the two any combination.Computer-readable medium for example can be --- but it is unlimited In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates The more specific example of machine readable medium can include but is not limited to: electrical connection, portable meter with one or more conducting wires Calculation machine disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer-readable medium, which can be, any includes or storage program has Shape medium, the program can be commanded execution system, device or device use or in connection.And in the application In, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, wherein Carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to electric Magnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Jie Any computer-readable medium other than matter, the computer-readable medium can be sent, propagated or transmitted for being held by instruction Row system, device or device use or program in connection.The program code for including on computer-readable medium It can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. or above-mentioned any conjunction Suitable combination.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereof Machine program code, described program design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as C language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.? Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service It is connected for quotient by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include first acquisition unit, the first selection unit, generation unit.Wherein, the title of these units is not constituted under certain conditions Restriction to the unit itself, for example, first acquisition unit is also described as " being configured to obtain the hardware of target device The unit of information ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device: the hardware information of target device is obtained;Choose the journey being adapted in preset program segment set with acquired hardware information Sequence section, the program segment in program segment set is for generating the application for running on different target equipment;Based on selected program segment Generate the application for running on target device.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (12)

1. one kind is for generating application method, comprising:
Obtain the hardware information of target device;
Choose the program segment being adapted in preset program segment set with acquired hardware information, the journey in described program section set Sequence section is for generating the application for running on different target equipment;
The application for running on the target device is generated based on selected program segment.
It is described the target is run on based on selected program segment generation to set 2. according to the method described in claim 1, wherein Before standby application, the method also includes:
Obtain the first instruction information of the first had function of instruction application to be generated;
According to the first instruction information, the first identifier of the program segment for realizing first function is determined;
Choose the code segment of the instruction of first identifier described in described program section set.
It is described the target is run on based on selected program segment generation to set 3. according to the method described in claim 1, wherein After standby application, the method also includes:
Obtain the second indication information that the second had function of application to be generated is deleted in instruction;
According to the second indication information, the second identifier of the program segment for realizing second function is determined;
Delete the code segment of the instruction of second identifier described in application generated.
4. method according to any one of claim 1-3, wherein the hardware information includes screen message, the screen Curtain information includes screen shape information and/or screen resolution information;And
It is described to choose the program segment being adapted in preset program segment set with acquired hardware information, comprising:
According to the journey of the interface parameter in pre-set screen message and described program section set for determining application to be generated The corresponding relationship of sequence section chooses program segment corresponding with the screen message in described program section set.
5. according to the method described in claim 4, wherein, the hardware information further includes at least one of following: processor information, Storage space information, battery capacity information;And
It is described according in pre-set screen message and described program section set for determining the interface parameter of application to be generated Program segment corresponding relationship, choose described program section set in program segment corresponding with the screen message, comprising:
The processing capacity information for characterizing the processing capacity of the target device is determined according to the hardware information;
According to the journey of the interface parameter in pre-set screen message and described program section set for determining application to be generated The corresponding relationship of sequence section and the pre-set matched processing capacity information of program segment with described program section set, choosing Take corresponding with the screen message in described program section set, and the program segment with the processing capacity information matches determined.
6. one kind is for generating application apparatus, comprising:
First acquisition unit is configured to obtain the hardware information of target device;
First selection unit is configured to choose the program being adapted in preset program segment set with acquired hardware information Section, the program segment in described program section set is for generating the application for running on different target equipment;
Generation unit is configured to generate the application for running on the target device based on selected program segment.
7. device according to claim 6, wherein described device further include:
Second acquisition unit is configured to obtain the first instruction information for indicating the first had function of application to be generated;
First determination unit is configured to determine the program for realizing first function according to the first instruction information The first identifier of section;
Second selection unit is configured to choose the code segment of the instruction of first identifier described in described program section set.
8. device according to claim 6, wherein described to run on the target based on selected program segment generation and set After standby application, described device further include:
Third acquiring unit is configured to obtain the second instruction letter that the second had function of application to be generated is deleted in instruction Breath;
Second determination unit is configured to determine the program for realizing second function according to the second indication information The second identifier of section;
Unit is deleted, is configured to delete the code segment of the instruction of second identifier described in application generated.
9. device a method according to any one of claims 6-8, wherein the hardware information includes screen message, the screen Curtain information includes screen shape information and/or screen resolution information;And
First selection unit is further configured to use according in pre-set screen message and described program section set In the corresponding relationship of the program segment for the interface parameter for determining application to be generated, chooses in described program section set and believe with the screen Cease corresponding program segment.
10. device according to claim 9, wherein the hardware information further includes at least one of following: processor letter Breath, storage space information, battery capacity information;And
First selection unit, comprising:
It determines subelement, is configured to determine the processing energy for characterizing the processing capacity of the target device according to the hardware information Force information;
Choose subelement, be configured to according to pre-set screen message in described program section set be used for determine it is to be generated The corresponding relationship of the program segment of the interface parameter of application and the pre-set program segment with described program section set match Processing capacity information, choose described program section set in it is corresponding with the screen message, and with determine processing capacity letter Cease matched program segment.
11. a kind of electronic equipment, comprising:
One or more processors;
Storage device is stored thereon with one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors Realize such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, such as right is realized when which is executed by processor It is required that any method in 1-5.
CN201810975793.7A 2018-08-24 2018-08-24 Method and device for generating application Pending CN109144502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810975793.7A CN109144502A (en) 2018-08-24 2018-08-24 Method and device for generating application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810975793.7A CN109144502A (en) 2018-08-24 2018-08-24 Method and device for generating application

Publications (1)

Publication Number Publication Date
CN109144502A true CN109144502A (en) 2019-01-04

Family

ID=64828059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810975793.7A Pending CN109144502A (en) 2018-08-24 2018-08-24 Method and device for generating application

Country Status (1)

Country Link
CN (1) CN109144502A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106855A1 (en) * 2004-11-02 2006-05-18 International Business Machines Corporation Reusable row indices table
CN104516659A (en) * 2013-09-27 2015-04-15 联想(北京)有限公司 Information processing method and device
CN104602121A (en) * 2014-12-09 2015-05-06 四川长虹电器股份有限公司 Smart television software and hardware separation method
CN105653258A (en) * 2015-11-06 2016-06-08 乐视移动智能信息技术(北京)有限公司 Code processing method and apparatus
CN105653254A (en) * 2014-12-03 2016-06-08 科大讯飞股份有限公司 Native interface adaptive method, apparatus and electronic equipment employing same
CN106775658A (en) * 2016-11-28 2017-05-31 努比亚技术有限公司 Acquiescence wallpaper adaptive approach and terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060106855A1 (en) * 2004-11-02 2006-05-18 International Business Machines Corporation Reusable row indices table
CN104516659A (en) * 2013-09-27 2015-04-15 联想(北京)有限公司 Information processing method and device
CN105653254A (en) * 2014-12-03 2016-06-08 科大讯飞股份有限公司 Native interface adaptive method, apparatus and electronic equipment employing same
CN104602121A (en) * 2014-12-09 2015-05-06 四川长虹电器股份有限公司 Smart television software and hardware separation method
CN105653258A (en) * 2015-11-06 2016-06-08 乐视移动智能信息技术(北京)有限公司 Code processing method and apparatus
CN106775658A (en) * 2016-11-28 2017-05-31 努比亚技术有限公司 Acquiescence wallpaper adaptive approach and terminal

Similar Documents

Publication Publication Date Title
CN110020388A (en) A kind of page display method and system
US11132114B2 (en) Method and apparatus for generating customized visualization component
CN108989882A (en) Method and apparatus for exporting the snatch of music in video
CN110134880A (en) Offer, display methods, device, electronic equipment and the storage medium of comment data
CN109347720A (en) It determines group member, send the method and apparatus that the request of group is added
CN109992732A (en) Information sharing method, device, electronic equipment and storage medium
CN109062563A (en) Method and apparatus for generating the page
CN109656656A (en) Method and apparatus for generating group chat head portrait
CN109803008A (en) Method and apparatus for showing information
CN109684188A (en) Test method and device
CN110263565A (en) Method and apparatus for calling service
CN107797804A (en) The method and apparatus for generating front end interactive interface
CN109815105A (en) Applied program testing method and device based on Btrace
CN108959087A (en) test method and device
CN107948437A (en) Put out screen and show method and apparatus
CN109862100A (en) Method and apparatus for pushed information
CN110070394A (en) Data processing method, system, medium and calculating equipment
CN109947423A (en) Code generating method, device, terminal and medium
CN109814915A (en) Method for parameter configuration, device, medium and electronic equipment based on lua
CN110019242A (en) Processing method, device and system for tables of data
CN110288523A (en) Image generating method and device
CN109614603A (en) Method and apparatus for generating information
CN108810105A (en) For pushed information, the method and apparatus for showing information
CN110046670A (en) Feature vector dimension reduction method and device
CN110083351A (en) Method and apparatus for generating code

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190104

RJ01 Rejection of invention patent application after publication