CN108427731A - Processing method, device, terminal device and the medium of page code - Google Patents

Processing method, device, terminal device and the medium of page code Download PDF

Info

Publication number
CN108427731A
CN108427731A CN201810161015.4A CN201810161015A CN108427731A CN 108427731 A CN108427731 A CN 108427731A CN 201810161015 A CN201810161015 A CN 201810161015A CN 108427731 A CN108427731 A CN 108427731A
Authority
CN
China
Prior art keywords
code
page
business logic
public function
file
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.)
Granted
Application number
CN201810161015.4A
Other languages
Chinese (zh)
Other versions
CN108427731B (en
Inventor
张彩凤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201810161015.4A priority Critical patent/CN108427731B/en
Publication of CN108427731A publication Critical patent/CN108427731A/en
Application granted granted Critical
Publication of CN108427731B publication Critical patent/CN108427731B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • 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 present invention is suitable for Internet technical field, provides a kind of processing method of page code, device, terminal device and medium, including:Obtain the business logic codes of the page to be loaded;Determine the title of the associated each public function of business logic codes;In common code file, the function body code segment to match with the title of public function is obtained;For acquiring function body code segment, the page common code file for including the function body code segment is generated;When receiving the access request about the page to be loaded that client is sent out, the associated with of the page to be loaded is obtained, so that client loading page common code file and business logic codes file.This invention ensures that user by client or browser come when accessing a certain Webpage, the corresponding page common code file of the Webpage can only be loaded, without reloading all common codes included in common code file, therefore reduce the code redundancy degree in page loading procedure.

Description

Processing method, device, terminal device and the medium of page code
Technical field
The invention belongs to Internet technical field more particularly to a kind of processing method of page code, device, terminal devices And medium.
Background technology
In development project, developer often uses some identical function modules, therefore, in order to reduce Code, which repeats the case where writing, to be occurred, and project team usually can all pre-establish a common code file, and by common function, Category code is stored in the common code file, so that each Webpage that developer is write can be directly from this In common code file, the function module needed for quick calling.
For a certain Webpage, business logic codes and common code two parts are generally included.Webpage page The common code called needed for face, the often only sub-fraction code in common code file, also, the different web pages page is real Border needs a part of common code loaded from common code file also to differ.However, loading a webpage page in browser When face, other than the business logic codes for loading the Webpage, in order to call the public generation associated by business logic codes Code, browser must load the entire common code file that backstage is pre-established simultaneously.As it can be seen that the public affairs of browser actual loaded The common code that many Webpages need not call is contained in code file altogether, page code therefore exists in the prior art The problem of loading redundancy.
Invention content
In view of this, an embodiment of the present invention provides a kind of processing method of page code, device, terminal device and Jie Matter, to solve the problems, such as that the page code in the presence of the prior art loads redundancy.
The first aspect of the embodiment of the present invention provides a kind of processing method of page code, including:
Obtain the business logic codes of the page to be loaded;
Processing is detected to the business logic codes, with the associated each public letter of the determination business logic codes Several title, wherein the public function is the code element being stored in the common code file pre-established;
In the common code file, the function body code segment to match with the title of the public function is obtained;
For acquiring the function body code segment, the page common code text comprising the function body code segment is generated Part;
When receiving the access request about the page to be loaded that client is sent out, the page to be loaded is obtained Associated with so that the client loads the associated with, the associated with includes that the page is public Code file and business logic codes file comprising the business logic codes.
The second aspect of the embodiment of the present invention provides a kind of processing unit of page code, including:
First acquisition unit, the business logic codes for obtaining the page to be loaded;
Detection unit is closed for being detected processing to the business logic codes with the determination business logic codes The title of each public function of connection, wherein the public function is the generation being stored in the common code file pre-established Data code;
Second acquisition unit, in the common code file, obtaining and matching with the title of the public function Function body code segment;
Generation unit, for for acquiring the function body code segment, generating the page for including the function body code segment Face common code file;
Loading unit, for when receiving the access request about the page to be loaded that client is sent out, obtaining The associated with of the page to be loaded, so that the client loads the associated with, the associated with packet Include the page common code file and the business logic codes file comprising the business logic codes.
The third aspect of the embodiment of the present invention provides a kind of terminal device, including memory and processor, described to deposit Reservoir is stored with the computer program that can be run on the processor, and the processor is realized when executing the computer program The step of processing method of page code as described in relation to the first aspect.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, and page code as described in relation to the first aspect is realized when the computer program is executed by processor Processing method the step of.
It in the embodiment of the present invention, is detected by the business logic codes to the page, to identify its public affairs for being included Function altogether, and the matched function body code segment of public function institute is extracted from common code file, so that it is stored in again In the page common code file generated, it ensure that user is accessing a certain Webpage by client or browser When, the corresponding page common code file of the Webpage can be only loaded, is wrapped without reloading in common code file Therefore all common codes contained reduce the code redundancy degree in page loading procedure so that the public affairs that client is loaded Code is exactly the code called needed for current page altogether;Also, since the load data volume of common code greatly reduces, thus Improve the loading velocity of webpage.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some Embodiment for those of ordinary skill in the art without having to pay creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart of the processing method of page code provided in an embodiment of the present invention;
Fig. 2 is the specific implementation flow chart of the processing method S102 of page code provided in an embodiment of the present invention;
Fig. 3 is the implementation flow chart of the processing method for the page code that another embodiment of the present invention provides;
Fig. 4 is the implementation flow chart of the processing method for the page code that further embodiment of this invention provides;
Fig. 5 is the implementation flow chart of the processing method for the page code that yet another embodiment of the invention provides;
Fig. 6 is the structure diagram of the processing unit of page code provided in an embodiment of the present invention;
Fig. 7 is the schematic diagram of terminal device provided in an embodiment of the present invention.
Specific implementation mode
In being described below, for illustration and not for limitation, it is proposed that such as tool of particular system structure, technology etc Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention can also be realized in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Fig. 1 shows the implementation process of the processing method of page code provided in an embodiment of the present invention, this method flow packet Include step S101 to S105.The specific implementation principle of each step is as follows:
S101:Obtain the business logic codes of the page to be loaded.
Different projects needs to develop different functions, and different functions needs different realizations, realizes these cores The code of function is business logic codes.The business logic codes of the page to be loaded are generated in advance and are stored in by developer In the information bank of development platform.
In the embodiment of the present invention, client can be therefore requested by the access address based on access address come accession page The page is known as the above-mentioned page to be loaded.Wherein, client includes but not limited to the browser and installation that terminal device is run In all kinds of mobile applications etc. on terminal device.As it can be seen that the page to be loaded can be the Webpage shown needed for browser, It can be the application interface in mobile application.
In the embodiment of the present invention, according to the access address of reception, the service logic of the page to be loaded is read from information bank Code.
S102:Processing is detected to the business logic codes, it is associated each with the determination business logic codes The title of public function, wherein the public function is the code element being stored in the common code file pre-established.
Occur to reduce the case where code repetition is write, project team usually can all pre-establish a common code text Part, and common function, category code are stored in the common code file, so that each page that developer is write Face can be directly from the common code file, the function module needed for quick calling.Therefore, in addition to being deposited in above- mentioned information library The common code file is also stored with except the business logic codes for storing up the page to be loaded, in information bank.Each common code text Part is related to the service logic of multiple pages.For example, page A and page B is the Webpage under domain name abc.com, but have There is different store paths, then manages for convenience, the public function associated by page A and page B is stored to same public affairs Altogether in code file.
In the embodiment of the present invention, the business logic codes of the page to be loaded to being obtained acquired in above-mentioned S101 are detected Processing, from the business logic codes, to identify that it includes and is stored in each public function in common code file Title.
Specifically, described that processing is detected to the business logic codes, it is associated with the determination business logic codes Each public function title, including:
Obtain the title of each public function in common code file;For the title of wherein each public function, by it It is passed to default function_exists () function in business logic codes as parameter;The business logic codes are run, To obtain the output valve of function_exists () function;If output valve is true value, it is determined that exist in business logic codes The title of the public function;If output valve is falsity, it is determined that the title of the public function is not present in business logic codes.
As an embodiment of the present invention, Fig. 2 shows the processing methods of page code provided in an embodiment of the present invention Another specific implementation flow of S102, details are as follows:
S1021:Preset public function identifier is obtained, the public function identifier is for identifying the public function Initial position.
S1022:Processing is detected to the business logic codes, wherein if being detected in the business logic codes To the public function identifier, then it is determined as the business adjacent to the code element name of the public function identifier by after and patrols Collect the title of the public function of associated codes.
In business logic codes, a public function of its required reference is defined with preset identifier, by the mark Know symbol and is known as public function identifier.According to the agreement of writing for the business logic codes worked out in advance, obtains and write agreement with this Matched above-mentioned public function identifier.Above-mentioned public function identifier for example can be " $ ", "@" and by one or more Other identifier symbol obtained combined by character etc..
Each sentence in business logic codes is traversed successively, whether there is in this with the above-mentioned public function identifier of determination Any position in sentence.If there are the public function identifiers for any position for detecting in sentence, it is determined that the position institute Corresponding sentence is the sentence that business logic codes call public function.At this point, carrying out analyzing processing to the sentence, it is somebody's turn to do with obtaining Each code element that sentence is included, above-mentioned code element include but not limited to function name, variable name, class name, link and Filename etc..For example, by carrying out word segmentation processing to sentence, each character string output that can separate space character is one A code element.
After identifying each code element that sentence is included, adjacent to the code of public function identifier member after acquisition The code element is then determined as being associated with the title of a public function of calling needed for business logic codes by element.
S103:In the common code file, the function body code to match with the title of the public function is obtained Section.
In the embodiment of the present invention, common code file includes multiple public functions, and each public function includes public function Title and its corresponding function body code segment.Wherein, function body code segment for realize public function function all code institutes The entirety of composition.
The title of public function associated by the business logic codes determined, in common code file search with The corresponding character string of the title, and read one section of code being located at after the character string.Specifically, since function body code segment is logical Its start-stop mark is often used as with preset identifier, therefore, will be wrapped between first start-stop mark after the character string The code segment contained is determined as the function body code segment corresponding to the title with the public function.
Illustratively, above-mentioned start-stop mark for example can be " { " and " } ".
S104:For acquiring the function body code segment, the page public generation for including the function body code segment is generated Code file.
In the embodiment of the present invention, page common code file corresponding with the page to be loaded is created, by above-mentioned acquisition The title of obtained function body code segment and its corresponding public function is written in the page common code file.
Preferably, by associated by the page to be loaded model code and picture the page common code file is also written, So that client therefrom can directly transfer Show Styles and the page institute of the page when loading the page common code file The picture that need to be shown, thus improve the loading efficiency and rendering efficiency of the page.
In the embodiment of the present invention, page common code file is JavaScript file.
S105:When receiving the access request about the page to be loaded that client is sent out, obtain described to be added The associated with of the page is carried, so that the client loads the associated with, the associated with includes the page Face common code file and business logic codes file comprising the business logic codes.
Page common code file corresponding to each page to be loaded can be generated in advance, and can also generate in real time.That is, connecing When receiving the access request about a page to be loaded that client is sent out, above-mentioned S101 is executed to S104, alternatively, receiving As soon as before the access request about the page to be loaded that client is sent out, above-mentioned S101 to S104 is first carried out.
In the embodiment of the present invention, when receiving the access request about the page to be loaded that client is sent out, from information The associated with of the page to be loaded is read in library, and by the response message that associated with output is access request, is returned It is back to client.Wherein, the associated with of the page to be loaded includes the page common code file and industry of the page to be loaded Business logical code file.
After client receives the associated with of the page to be loaded, by corresponding resolution component, such as browser or shifting Dynamic application, parses the associated with so that client can be called rapidly during running business logic codes Function body code segment in page common code file, to realize the load to current page.
It in the embodiment of the present invention, is detected by the business logic codes to the page, to identify its public affairs for being included Function altogether, and the matched function body code segment of public function institute is extracted from common code file, so that it is stored in again In the page common code file generated, it ensure that user is accessing a certain Webpage by client or browser When, the corresponding page common code file of the Webpage can be only loaded, is wrapped without reloading in common code file Therefore all common codes contained reduce the code redundancy degree in page loading procedure so that the public affairs that client is loaded Code is exactly the code called needed for current page altogether;Also, since the load data volume of common code greatly reduces, thus Improve the loading velocity of webpage.
As an alternative embodiment of the invention, Fig. 3 shows the place for the page code that another embodiment of the present invention provides The implementation process of reason method, details are as follows:
S106:The code segment that user pre-enters is obtained, the code segment is stored in the common code file.
In the embodiment of the present invention, for the ease of the business logic codes and common code of the User Exploitation page to be loaded, The code segment that user is pre-entered can be keyed in as a public function to common code file.
Specifically, it when receiving public function establishment instruction input by user, is compiled in development platform interface generation code Region is collected, and user is asked to input customized code statement in Code Edit region.When detecting public function saving button Trigger event when, by Code Edit region each code statement output be a public function function body code segment, and will The function body code segment is added to the end for the common code file that information bank is stored, alternatively, the function body code segment is added It adds in the new common code file of one generated in real time.
S107:Create code module corresponding with the code segment.
S108:In development platform interface, the corresponding control of each code module, the identifier of the control are shown For the marking code input by user.
In the embodiment of the present invention, for the ease of being managed to each function body code segment, it will be connect in Code Edit region The code segment received is created as a code module, and generates the corresponding control of code module.By the control exposure in exploitation Platform interface, and the correspondence of control and code module is stored in back-end data table.Also, development platform interface institute The identifier of the control of displaying is marking code input by user.
Wherein, above-mentioned acquisition marking code input by user can be realized by following two modes:Mode one, Prompt window is popped up at development platform interface, corresponding to the code module that prompts user to input in the window currently to be created Marking code, the character string being including but not limited to made of a kind of or multiclass character;Mode two, based on above-mentioned preset public Function identifier is detected the code segment in Code Edit region, is identified adjacent to public function with obtaining after detection obtains The code element name of symbol, and the code element name is determined as the marking code that user is inputted.
Illustratively, above-mentioned control corresponding with code module is button, that is, in the form of button, in development platform circle A new button, and the marking code that the title of the button is set as acquiring are shown in the option column in face.
S109:When detecting the selection instruction based on the control, the code segment is inserted into the development platform The Code Edit region at interface.
Each control at development platform interface can be selected based on the clicking operation of user.When detecting based on a certain When the selection instruction of control, according to the correspondence of pre-stored control and code module, generation corresponding with the control is obtained Code module.After reading the code module and characterizing a code segment, which is shown to the code volume at development platform interface Collect region.
Preferably, when showing the code segment to the Code Edit region at development platform interface, specifically by the code Section is inserted into the white space pointed by cursor, alternatively, the title of code segment and its corresponding public function is inserted into jointly The top in Code Edit region.
Preferably, when detecting that user logs in development platform, determine the user's according to the login account of user Code module chooses permission.If detecting, the control selected by user is not belonging within the scope of its code module selection permission, Then stop the corresponding code segment of the control being inserted into Code Edit region, thus avoids the code mould of User Defined establishment Block is illegally called by other exploration project groups, thus improves the management safety of page code.
In the embodiment of the present invention, by the control corresponding to each code module of development platform showing interface, and examining When measuring the selection instruction based on control, corresponding code segment is inserted into Code Edit region so that user can edit When business logic codes in the page, be rapidly introduced into needed for the function body code segment of public function that calls, thus improve Development efficiency;Since user can be with the code segment corresponding to custom code module, and code module storage is shown as one Control, therefore the quantity for the public function that development platform is stored is extended, improve the flexibility of exploitation operation.
As another embodiment of the present invention, Fig. 4 shows the place for the page code that further embodiment of this invention provides The implementation process of reason method.As shown in figure 4, before above-mentioned S107, further include:
S110:Obtain the marking code input by user.
S111:Judge the marking code and any public function in the common code file title whether phase Together.
S112:Refusal creates code module corresponding with the code segment.
In the embodiment of the present invention, marking code input by user is identified as created needed for user public function Title clashes in order to avoid the title and the title of already present public function in common code file of public function, Code segment is stored to before the code module corresponding to common code file and establishment code segment, judges that the marking code is The title of any public function in the no file with common code is identical.If it is not, thening follow the steps S107;If so, executing step Rapid S112, refusal creates code module corresponding with the code segment, and prompts user's marking code existing, needs again Hereafter marking code corresponding to input code section returns and executes above-mentioned steps S110;Until marking code and common code text When the title of each public function is all different in part, code module corresponding with code segment is just created.
Unmentioned step realization principle is identical as step realization principle in above-described embodiment in the embodiment of the present invention, therefore No longer repeat one by one.
In the embodiment of the present invention, by after receiving code segment and marking code input by user, prejudging generation Code identify whether it is identical as the title of any public function in common code file, when the determination result is yes, refusal create with The corresponding code module of code segment avoids the control that development platform interface will appear same code mark, ensure that code mould The uniqueness of block and public function title avoids subsequently to improve the accuracy rate of page code exploitation based on identical The control of marking code occurs to read and be inserted into the situation for occurring code segment importing mistake when code segment.
As one more embodiment of the present invention, Fig. 5 shows the processing for the page code that yet another embodiment of the invention provides The implementation process of method further includes as shown in figure 5, after above-mentioned S107:
S113:Show the corresponding network linking address of the code module.
In the embodiment of the present invention, each code segment received is stored into a newly-built common code file, and Common code file is preserved to the different store paths of information bank.Each store path of information bank can be provided externally It accesses, therefore, the store path based on code segment generates the corresponding network linking address of the code segment, and by the network linking Address is published in development platform interface.
Preferably, by the control bundle corresponding to network linking address and code segment, to detect control selection instruction When, the network linking address corresponding to the control is inputted in clipbook, so that user executes stickup in Code Edit region When operation, the network linking address in clipbook can be inserted into Code Edit region.
S114:In the address link label in the Code Edit region, if detecting, the user keys in the network The corresponding code segment of the code module is then inserted into the Code Edit region by chained address.
In the embodiment of the present invention, Code Edit region has also showed that preset multiple function menu labels, for example, address chain It connects label, preserve label and priority assignation label etc..If being detected in the link label of address, user has input any network Chained address then carries out dissection process, to judge whether the network linking address deposits in information bank to the network linking address In corresponding code module.
Similarly, if detecting the network linking address that user is replicated based on clipbook in Code Edit region to execute When paste operation, judge that the network linking address whether there is corresponding code module in information bank.
If there are the corresponding code modules of the network linking address in information bank, the corresponding code of the code module is read Section, and the code segment is inserted into current Code Edit region;If there is no the network linking address is corresponding in information bank Code module, then using the network linking address as the attribute value in the address tag generated in real time after, be inserted into code Editing area.
In the embodiment of the present invention, by showing the network linking address corresponding to code module so that user can be flexible The network linking address of the required code module being inserted into directly is keyed in the Code Edit region of different platform in ground so that finally exist Load is when writing the page to be loaded of completion, can directly invoke with the matched code segment of the network linking address, thus also carry The high development efficiency of page code, avoids the problem of developer needs to repeatedly input identical code segment and occurs.Due to The different pages to be loaded can call the code segment of identical network chained address jointly, therefore be loaded needed for also reducing public The degree of redundancy of code file.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Corresponding to the processing method for the page code that the embodiment of the present invention is provided, Fig. 6 shows that the embodiment of the present invention carries The structure diagram of the processing unit of the page code of confession.For convenience of description, only the parts related to this embodiment are shown.
With reference to Fig. 6, which includes:
First acquisition unit 61, the business logic codes for obtaining the page to be loaded.
Detection unit 62, for being detected processing to the business logic codes, with the determination business logic codes The title of associated each public function, wherein the public function is to be stored in the common code file pre-established Code element.
Second acquisition unit 63, in the common code file, obtaining the title phase with the public function The function body code segment matched.
Generation unit 64, for for acquiring the function body code segment, generating comprising the function body code segment Page common code file.
Loading unit 65, for when receiving the access request about the page to be loaded that client is sent out, obtaining The associated with of the page to be loaded is taken, so that the client loads the associated with, the associated with Including the page common code file and include the business logic codes file of the business logic codes.
Optionally, the detection unit 62 includes:
Subelement is obtained, for obtaining preset public function identifier, the public function identifier is for identifying institute State the initial position of public function.
Detection sub-unit, for being detected processing to the business logic codes, wherein if in the service logic generation The public function identifier is detected in code, then is determined as institute adjacent to the code element name of the public function identifier by after State the title of the associated public function of business logic codes.
Optionally, the processing unit of the page code further includes:
The code segment is stored in described public by third acquiring unit, the code segment pre-entered for obtaining user In code file.
Creating unit, for creating code module corresponding with the code segment.
Display unit, in development platform interface, showing the corresponding control of each code module, the control Identifier be the marking code input by user.
It is inserted into unit, for when detecting the selection instruction based on the control, the code segment being inserted into described The Code Edit region at development platform interface.
Optionally, the processing unit of the page code further includes:
4th acquiring unit, for obtaining the marking code input by user.
Judging unit, the name for judging the marking code and any public function in the common code file Whether identical claim.
Refuse unit, if the title for the marking code and any public function in the common code file It is identical, then refuse to create code module corresponding with the code segment.
Optionally, the processing unit of the page code further includes:
Address display unit, for showing the corresponding network linking address of the code module.
Second is inserted into unit, is used in the address link label in the Code Edit region, if detecting the user The network linking address is keyed in, then the corresponding code segment of the code module is inserted into the Code Edit region.
It in the embodiment of the present invention, is detected by the business logic codes to the page, to identify its public affairs for being included Function altogether, and the matched function body code segment of public function institute is extracted from common code file, so that it is stored in again In the page common code file generated, it ensure that user is accessing a certain Webpage by client or browser When, the corresponding page common code file of the Webpage can be only loaded, is wrapped without reloading in common code file Therefore all common codes contained reduce the code redundancy degree in page loading procedure so that the public affairs that client is loaded Code is exactly the code called needed for current page altogether;Also, since the load data volume of common code greatly reduces, thus Improve the loading velocity of webpage.
Fig. 7 is the schematic diagram for the terminal device that one embodiment of the invention provides.As shown in fig. 7, the terminal of the embodiment is set Standby 7 include:Processor 70 and memory 71 are stored with the calculating that can be run on the processor 70 in the memory 71 Machine program 72, for example, page code processing routine.The processor 70 is realized above-mentioned each when executing the computer program 72 Step in the processing method embodiment of a page code, such as step 101 shown in FIG. 1 is to 105.Alternatively, the processor The function of each module/unit in above-mentioned each device embodiment, such as list shown in Fig. 6 are realized when the 70 execution computer program 72 The function of member 61 to 65.
Illustratively, the computer program 72 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 71, and are executed by the processor 70, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 72 in the terminal device 7 is described.
The terminal device 7 can be that the calculating such as desktop PC, notebook, palm PC and cloud server are set It is standby.The terminal device may include, but be not limited only to, processor 70, memory 71.It will be understood by those skilled in the art that Fig. 7 The only example of terminal device 7 does not constitute the restriction to terminal device 7, may include than illustrating more or fewer portions Part either combines certain components or different components, such as the terminal device can also include input-output equipment, net Network access device, bus etc..
Alleged processor 70 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 71 can be the internal storage unit of the terminal device 7, such as the hard disk of terminal device 7 or interior It deposits.The memory 71 can also be to be equipped on the External memory equipment of the terminal device 7, such as the terminal device 7 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 71 can also both include the storage inside list of the terminal device 7 Member also includes External memory equipment.The memory 71 is for storing needed for the computer program and the terminal device Other programs and data.The memory 71 can be also used for temporarily storing the data that has exported or will export.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can store program The medium of code.
The above, above example are only to illustrate the technical solution of the application, rather than its limitations;Although with reference to before Embodiment is stated the application is described in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope of each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of processing method of page code, which is characterized in that including:
Obtain the business logic codes of the page to be loaded;
Processing is detected to the business logic codes, with the associated each public function of the determination business logic codes Title, wherein the public function is the code element being stored in the common code file pre-established;
In the common code file, the function body code segment to match with the title of the public function is obtained;
For acquiring the function body code segment, the page common code file for including the function body code segment is generated;
When receiving the access request about the page to be loaded that client is sent out, the pass of the page to be loaded is obtained Join file, so that the client loads the associated with, the associated with includes the page common code File and business logic codes file comprising the business logic codes.
2. the processing method of page code as described in claim 1, which is characterized in that it is described to the business logic codes into Row detection process, with the title of the associated each public function of the determination business logic codes, including:
Preset public function identifier is obtained, the public function identifier is used to identify the start bit of the public function It sets;
Processing is detected to the business logic codes, wherein if being detected in the business logic codes described public Function identifier is then determined as the business logic codes adjacent to the code element name of the public function identifier by after and is associated with The public function title.
3. the processing method of page code as described in claim 1, which is characterized in that further include:
The code segment that user pre-enters is obtained, the code segment is stored in the common code file;
Create code module corresponding with the code segment;
In development platform interface, the corresponding control of each code module is shown, the identifier of the control is the use The marking code of family input;
When detecting the selection instruction based on the control, the code segment is inserted into the code at the development platform interface Editing area.
4. the processing method of page code as claimed in claim 3, which is characterized in that in the establishment and the code segment pair Before the code module answered, further include:
Obtain the marking code input by user;
Judge whether the marking code is identical as the title of any public function in the common code file;
If the marking code is identical as any title of the public function in the common code file, refuse create with The corresponding code module of the code segment.
5. the processing method of page code as claimed in claim 3, which is characterized in that in the establishment and the code segment pair After the code module answered, further include:
Show the corresponding network linking address of the code module;
In the address link label in the Code Edit region, if detecting, the user keys in the network linking address, The corresponding code segment of the code module is then inserted into the Code Edit region.
6. a kind of terminal device, including memory and processor, the memory, which is stored with, to be run on the processor Computer program, which is characterized in that the processor realizes following steps when executing the computer program:
Obtain the business logic codes of the page to be loaded;
Processing is detected to the business logic codes, with the associated each public function of the determination business logic codes Title, wherein the public function is the code element being stored in the common code file pre-established;
In the common code file, the function body code segment to match with the title of the public function is obtained;
For acquiring the function body code segment, the page common code file for including the function body code segment is generated;
When receiving the access request about the page to be loaded that client is sent out, the pass of the page to be loaded is obtained Join file, so that the client loads the associated with, the associated with includes the page common code File and business logic codes file comprising the business logic codes.
7. terminal device as claimed in claim 6, which is characterized in that described to be detected place to the business logic codes Reason the step of with the title of the associated each public function of the determination business logic codes, specifically includes:
Preset public function identifier is obtained, the public function identifier is used to identify the start bit of the public function It sets;
Processing is detected to the business logic codes, wherein if being detected in the business logic codes described public Function identifier is then determined as the business logic codes adjacent to the code element name of the public function identifier by after and is associated with The public function title.
8. terminal device as claimed in claim 6, which is characterized in that when the processor executes the computer program, also Realize following steps:
The code segment that user pre-enters is obtained, the code segment is stored in the common code file;
Create code module corresponding with the code segment;
In development platform interface, the corresponding control of each code module is shown, the identifier of the control is the use The marking code of family input;
When detecting the selection instruction based on the control, the code segment is inserted into the code at the development platform interface Editing area.
9. terminal device as claimed in claim 8, which is characterized in that when the processor executes the computer program, also Realize following steps:
Obtain the marking code input by user;
Judge whether the marking code is identical as the title of any public function in the common code file;
If the marking code is identical as any title of the public function in the common code file, refuse create with The corresponding code module of the code segment.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201810161015.4A 2018-02-26 2018-02-26 Page code processing method and device, terminal equipment and medium Active CN108427731B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810161015.4A CN108427731B (en) 2018-02-26 2018-02-26 Page code processing method and device, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810161015.4A CN108427731B (en) 2018-02-26 2018-02-26 Page code processing method and device, terminal equipment and medium

Publications (2)

Publication Number Publication Date
CN108427731A true CN108427731A (en) 2018-08-21
CN108427731B CN108427731B (en) 2021-08-13

Family

ID=63157267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810161015.4A Active CN108427731B (en) 2018-02-26 2018-02-26 Page code processing method and device, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN108427731B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109343839A (en) * 2018-09-30 2019-02-15 武汉斗鱼网络科技有限公司 Data service configuration method, storage medium, electronic equipment and system
CN109828754A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 A kind of intelligent handover method, device and the equipment of program development project
CN109918126A (en) * 2019-01-28 2019-06-21 平安普惠企业管理有限公司 Method, apparatus, computer equipment and the storage medium of Code Edit
CN110262846A (en) * 2019-05-07 2019-09-20 平安科技(深圳)有限公司 Interface loading method, system, computer equipment and storage medium based on module
CN111324474A (en) * 2020-02-18 2020-06-23 上海携程商务有限公司 Celery task management method, system, equipment and storage medium
CN111857881A (en) * 2020-07-21 2020-10-30 深圳创维-Rgb电子有限公司 Repo-based manifest warehouse loading method and device and storage medium
CN112416426A (en) * 2020-11-30 2021-02-26 北京有竹居网络技术有限公司 Application function issuing method, device, equipment and storage medium
CN113553522A (en) * 2020-04-24 2021-10-26 北京金山云网络技术有限公司 Page display method and device, electronic equipment and storage medium
CN114398032A (en) * 2021-12-20 2022-04-26 北京时空墨科技有限公司 Program writing method, apparatus and medium
CN117608559A (en) * 2024-01-24 2024-02-27 卡奥斯创智物联科技有限公司 Page display code generation method and device, electronic equipment and storage medium
CN117608559B (en) * 2024-01-24 2024-04-19 卡奥斯创智物联科技有限公司 Page display code generation method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110060997A1 (en) * 2009-09-10 2011-03-10 Usablenet Inc. Methods for optimizing interaction with a form in a website page and systems thereof
CN102236665A (en) * 2010-04-27 2011-11-09 华为技术有限公司 Page loading method and page loading device
CN103530160A (en) * 2013-10-21 2014-01-22 迈普通信技术股份有限公司 Page loading method and device
CN106354748A (en) * 2016-08-15 2017-01-25 北京数码视讯科技股份有限公司 Webpage generation method and device
CN107562749A (en) * 2016-06-30 2018-01-09 阿里巴巴集团控股有限公司 A kind of webpage loading method and webpage loading device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110060997A1 (en) * 2009-09-10 2011-03-10 Usablenet Inc. Methods for optimizing interaction with a form in a website page and systems thereof
CN102236665A (en) * 2010-04-27 2011-11-09 华为技术有限公司 Page loading method and page loading device
CN103530160A (en) * 2013-10-21 2014-01-22 迈普通信技术股份有限公司 Page loading method and device
CN107562749A (en) * 2016-06-30 2018-01-09 阿里巴巴集团控股有限公司 A kind of webpage loading method and webpage loading device
CN106354748A (en) * 2016-08-15 2017-01-25 北京数码视讯科技股份有限公司 Webpage generation method and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109343839A (en) * 2018-09-30 2019-02-15 武汉斗鱼网络科技有限公司 Data service configuration method, storage medium, electronic equipment and system
CN109828754A (en) * 2018-12-14 2019-05-31 深圳壹账通智能科技有限公司 A kind of intelligent handover method, device and the equipment of program development project
CN109918126A (en) * 2019-01-28 2019-06-21 平安普惠企业管理有限公司 Method, apparatus, computer equipment and the storage medium of Code Edit
CN110262846A (en) * 2019-05-07 2019-09-20 平安科技(深圳)有限公司 Interface loading method, system, computer equipment and storage medium based on module
CN111324474A (en) * 2020-02-18 2020-06-23 上海携程商务有限公司 Celery task management method, system, equipment and storage medium
CN111324474B (en) * 2020-02-18 2023-04-18 上海携程商务有限公司 Celery task management method, system, equipment and storage medium
CN113553522A (en) * 2020-04-24 2021-10-26 北京金山云网络技术有限公司 Page display method and device, electronic equipment and storage medium
CN111857881A (en) * 2020-07-21 2020-10-30 深圳创维-Rgb电子有限公司 Repo-based manifest warehouse loading method and device and storage medium
CN112416426A (en) * 2020-11-30 2021-02-26 北京有竹居网络技术有限公司 Application function issuing method, device, equipment and storage medium
CN114398032A (en) * 2021-12-20 2022-04-26 北京时空墨科技有限公司 Program writing method, apparatus and medium
CN117608559A (en) * 2024-01-24 2024-02-27 卡奥斯创智物联科技有限公司 Page display code generation method and device, electronic equipment and storage medium
CN117608559B (en) * 2024-01-24 2024-04-19 卡奥斯创智物联科技有限公司 Page display code generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108427731B (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN108427731A (en) Processing method, device, terminal device and the medium of page code
CN106528400A (en) MOCK testing method and device
CN108459962A (en) Code specification detection method, device, terminal device and storage medium
CN112650533B (en) Interface document generation method and device and terminal equipment
Fill SeMFIS: a flexible engineering platform for semantic annotations of conceptual models
CN101587441A (en) Apparatus, method, and system of assisting software development
CN110221959B (en) Application program testing method, device and computer readable medium
CN111813680B (en) Method and device for generating test script, computer equipment and storage medium
CN101819551B (en) Method and system for recording service interaction data of enterprise message system
CN110688307A (en) JavaScript code detection method, apparatus, device and storage medium
CN111694561A (en) Interface management method, device, equipment and storage medium
CN109977020B (en) Automatic testing method
CN113157315A (en) Method, device, equipment and medium for identifying difference information of different versions of software
US8819619B2 (en) Method and system for capturing user interface structure in a model based software system
CN115328759A (en) Form verification method and device
CN116974581B (en) Code generation method, device, electronic equipment and storage medium
CN105094810B (en) Data processing method and device based on CGI(Common gateway interface) plug-in unit
US9383972B2 (en) Methods and arrangements for processing and presentation of information
CN109254774A (en) The management method and device of code in software development system
CN111881220A (en) Data operation method and device under list storage, electronic equipment and storage medium
US20060005174A1 (en) Defining hierarchical structures with markup languages and reflection
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium storing program for executing
CN117408238A (en) Activity task management method, system, electronic device and storage medium
CN117032646A (en) Index configuration method, index execution method and system
CN114816400A (en) Method and system for building page based on JSON configuration, intelligent terminal and storage medium

Legal Events

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