CN112416426A - Application function issuing method, device, equipment and storage medium - Google Patents

Application function issuing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112416426A
CN112416426A CN202011371036.2A CN202011371036A CN112416426A CN 112416426 A CN112416426 A CN 112416426A CN 202011371036 A CN202011371036 A CN 202011371036A CN 112416426 A CN112416426 A CN 112416426A
Authority
CN
China
Prior art keywords
code
target
processed
difference
function
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
CN202011371036.2A
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.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network 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 Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202011371036.2A priority Critical patent/CN112416426A/en
Publication of CN112416426A publication Critical patent/CN112416426A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The embodiment of the disclosure provides a method, a device, equipment and a storage medium for function release of an application program, wherein the method comprises the following steps: acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function; acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request; determining a code to be processed matched with the target difference code in the target reference code; performing preset operation on the code to be processed by adopting the target difference code, and determining a processed reference code as a target code; and issuing the target function corresponding to the target code to the application to be issued. The target code can be ensured to only comprise the general logic code and the difference code corresponding to the application to be issued. Therefore, the data packet size of the code can be effectively reduced, and the lightweight processing of the target code is realized. Correspondingly, the application to be issued does not need to load the codes of other platforms.

Description

Application function issuing method, device, equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, and in particular, to a method, an apparatus, a device and a storage medium for function publishing of an application program.
Background
With the improvement of the hardware performance of the terminal device and the continuous progress of the artificial intelligence technology, more and more Applications (APPs) are running on the terminal device. Terminal devices are also becoming more and more diverse. And multiple different applications may often have the same functionality. For example, different short video APPs may have an Instant Messaging (IM) function. However, IM function pages and skip modes in different short video APPs may all have differences, and IM function pages and skip modes in different terminal devices of the same short video APP may also have differences. Therefore, how to implement the same function structure of different applications or the same application in different terminals becomes an urgent problem to be solved.
In the prior art, in the process of programming codes of application programs, different application programs or the same application program generally have partially multiplexed logic codes and partially different logic codes among the same functions in different terminals. In order to realize the construction of the same function in different applications, it is generally required to process different logic codes in different applications through if/else statements by judging the current running environment of the code in the running process of the code.
However, the processing of the code by the above method often results in poor readability of the code. In addition, the environment is judged during the operation, and the difference logic code is processed through the if/else statement, which often results in a larger data packet of the code. And may load much logic code within a single application platform that is not used by that application platform.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, equipment and a storage medium for issuing functions of application programs, which are used for solving the technical problems of poor code readability and large code data packet caused by processing different logic codes in different application programs through if/else statements.
In a first aspect, an embodiment of the present disclosure provides a method for issuing a function of an application program, including:
acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function;
acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request;
determining a code to be processed matched with the target difference code in the target reference code;
performing preset operation on the code to be processed by adopting the target difference code, and determining a processed reference code as a target code;
and issuing the target function corresponding to the target code to the application to be issued.
In a second aspect, an embodiment of the present disclosure provides a function issuing apparatus for an application program, including:
the request acquisition module is used for acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function;
the difference code acquisition module is used for acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request;
the determining module is used for determining a code to be processed matched with the target difference code in the target reference code;
the processing module is used for carrying out preset operation on the code to be processed by adopting the target difference code and determining the processed reference code as a target code;
and the issuing module is used for issuing the target function corresponding to the target code to the application to be issued.
In a third aspect, an embodiment of the present disclosure provides a function issuing device for an application program, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of function distribution of an application program as described above in the first aspect and in various possible designs of the first aspect.
In a fourth aspect, the embodiments of the present disclosure provide a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method for issuing a function of an application program according to the first aspect and various possible designs of the first aspect are implemented.
According to the method, the device, the equipment and the storage medium for issuing the function of the application program, after the function issuing request in the application program is obtained, the target difference code corresponding to the application identifier to be issued of the target function in the function issuing request is obtained first. And performing preset operation on the codes to be processed, which are matched with the target difference codes, in the target reference codes corresponding to the target functions by adopting the target difference codes to obtain target codes. And issuing the target function corresponding to the target code to the application to be issued. The target code is obtained by performing predetermined operation on the to-be-processed code by using the target difference code corresponding to the to-be-issued application identifier, so that the target code only comprises the universal logic code and the difference code corresponding to the to-be-issued application. Therefore, the data packet size of the code can be effectively reduced, and the lightweight processing of the target code is realized. Correspondingly, the application to be issued does not need to load the codes of other platforms.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is an application scenario diagram corresponding to a function issuing method of an application program provided in the embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a function issuing method of an application program according to an embodiment of the present disclosure;
fig. 3 is an instant messaging display interface corresponding to a first application platform provided in the embodiment of the present disclosure;
fig. 4 is an instant messaging display interface corresponding to a second application platform provided in the embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a function issuing method of an application according to a second embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a reference code and a candidate difference code provided by the present disclosure;
FIG. 7 is a schematic diagram of object code provided by an embodiment of the present disclosure;
fig. 8 is a flowchart illustrating a function issuing method of an application program according to a third embodiment of the present disclosure;
fig. 9 is a flowchart illustrating a function issuing method of an application according to a fourth embodiment of the present disclosure;
fig. 10 is a schematic flowchart of a function issuing method of an application program according to a fifth embodiment of the present disclosure;
fig. 11 is a schematic flowchart of a function issuing method of an application program according to a sixth embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of a function issuing apparatus of an application program according to a seventh embodiment of the present disclosure;
fig. 13 is a schematic structural diagram of a function issuing device of an application program according to an eighth embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In view of the above-mentioned technical problems of poor code readability and large code data package caused by processing different logic codes in different applications through if/else statements, the present disclosure provides a method, an apparatus, a device and a storage medium for issuing functions of an application.
It should be noted that the method, apparatus, device and storage medium for function distribution of application programs provided in the present disclosure may be applied to any scenario where the same function is distributed to different application software or the same function is distributed to different terminals.
As the functions of applications become more diversified, the same functions often exist in different applications. In the process of code editing, codes corresponding to the same functions generally have a large amount of general logic codes. However, different application programs or the same application program may include differentiated logic codes in codes corresponding to different functions in the terminal. In the prior art, when a certain function is to be released into a certain application, it is often necessary to package a general logic code and differential logic codes corresponding to all applications. In practical application, the code can be processed in an if/else mode according to the currently issued platform, so that the code is suitable for the issuing platform. However, the method for releasing the functions in the application program often causes the code to be too bloated, the readability is not strong, and the data packet of the code is large.
In the process of solving the technical problem, the inventor finds, through research, that in order to enhance readability of codes and achieve lightweight of the codes on the basis of achieving that the same function is issued to a plurality of different application platforms, multiplexing operation can be performed on general logic codes of the application platforms, and splitting operation can be performed on differential logic codes of the application platforms.
The inventor further researches and discovers that the reference code corresponding to the function to be released and the differentiation code corresponding to each application can be edited in advance, and the differentiation code comprises the application identifier. Before the function is released, a differentiation code corresponding to the application to be released may be used to perform a predetermined operation on a code matched with the differentiation code in the reference code, and a target code after the predetermined operation is released. The target code is obtained by performing predetermined operation on the to-be-processed code by using the target difference code corresponding to the to-be-issued application identifier, so that the target code only comprises the universal logic code and the difference code corresponding to the to-be-issued application. Therefore, the readability of the target code is effectively improved, and the lightweight processing of the code is realized.
Fig. 1 is an application scenario diagram corresponding to a function publishing method of an application program provided in an embodiment of the present disclosure, and as shown in fig. 1, the application scenario of the present disclosure at least includes: a terminal device 1 and a server 2. Wherein, the server 2 is provided with a function issuing device of an application program, and the function issuing device of the application program is written by adopting languages such as C/C + +, Java, Shell or Python; the terminal device 1 may be a desktop computer, a tablet computer, or the like. The terminal device 1 is in communication connection with the server 2 so that the two can perform information interaction. Specifically, when a user (e.g., an application developer) determines that a certain function of a certain application needs to be issued, a function issuing request may be triggered through an operation interface of the terminal device 1, the terminal device sends the function request to the server, and the server may send the function issuing request to the server when determining that a certain function of the application needs to be issued. The reference code and the differential code of each function in each application program can be stored in the server in advance through a database or a preset storage area. The server obtains the target difference code corresponding to the application identifier to be issued according to the function issuing request. As shown in fig. 1, if the identifier of the application to be issued is an identifier of an application a, and the target function is an instant messaging function, the obtained target difference code corresponding to the application a is "difference code-instant messaging-application a". Secondly, the server determines a code to be processed matched with the target difference code in the target reference code, if the target reference code is 'reference code-instant messaging', the code to be processed is 'code to be processed-instant messaging-application program A', then the target difference code is adopted to perform preset operation on the code to be processed, and the processed reference code is determined as the target code; and issuing the target function corresponding to the target code to the application to be issued.
Fig. 2 is a schematic flowchart of a function issuing method of an application program according to an embodiment of the present disclosure, and as shown in fig. 2, the method includes:
step 101, acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function.
The execution subject of this embodiment is a function issuing device of an application program, and the function issuing device of the application program can be coupled to a server.
In the present embodiment, different application software may have the same function, and the visual style, interaction habit, jump rule, etc. of the function may be different in different application software. Therefore, in order to realize precise release of the function in the application to be released, a function release request in the application program may be acquired first. The function issuing request in the application program may specifically include an application identifier to be issued of the target function.
Optionally, the function issuing request may be triggered by a developer through a terminal device.
Fig. 3 is an instant messaging display interface corresponding to a first application platform provided in the embodiment of the present disclosure; fig. 4 is an instant messaging display interface corresponding to the second application platform provided in the embodiment of the present disclosure, as shown in fig. 3 to 4, in the instant messaging display interface corresponding to the first application platform, a plurality of different icons, which are fans, praise, @ my, and comments, are displayed in an area above the display interface, and a user can view the information by clicking the icons. And the area below the display interface is used for sending private letters of different account numbers. In the instant messaging display interface corresponding to the second application platform, icons related to me are displayed on one side of the area above the display interface, and system notification icons are displayed on the other side of the area above the display interface. Accordingly, the user can view the private letter and the mentioned information by clicking the icon related to me, and view the notice sent by the system account by clicking the system notice icon. Therefore, the instant messaging functions corresponding to different application platforms are different in display interfaces and interaction habits.
And 102, acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request.
In this embodiment, each application may have its personalized content for the same target function. Therefore, in order to improve the readability of the code on the basis of realizing the target function release, for each application software, the difference code corresponding to the application software may be edited, and each difference code may include the identification information corresponding to the application software.
Accordingly, after the function release request is obtained, the target difference code corresponding to the application identifier to be released may be obtained according to the function release request.
And 103, determining a code to be processed matched with the target difference code in the target reference code.
In the present embodiment, a target reference code corresponding to a target function may be constructed in advance, and the target reference code includes all codes that can realize the target function. However, since the target reference code cannot meet the personalized requirements of the application to be released, the target reference code may be edited by using the target difference code.
Specifically, in order to implement the editing operation on the target reference code, it is first necessary to determine a to-be-processed code corresponding to the target difference code in the target reference code, so as to implement accurate processing of the code. And ensuring that the target function can be realized when the processed code runs.
And 104, performing preset operation on the code to be processed by adopting the target difference code, and determining the processed reference code as a target code.
In this embodiment, after determining the target difference code that matches the to-be-processed code, the target difference code may be used to perform a predetermined operation on the to-be-processed code, and the processed reference code may be used as the target code.
Optionally, the predetermined operation includes, but is not limited to, a replacement operation for the code to be processed.
Specifically, since only the generic logic code and the difference code corresponding to the application to be issued are included in the target code, the codes of other applications are not included. Therefore, the target code has strong readability and small data volume, and brings convenience to subsequent maintenance.
And 105, issuing the target function corresponding to the target code to the application to be issued.
In this embodiment, after the target difference code is used to perform the predetermined operation on the code to be processed and obtain the target code, the target function corresponding to the target code may be issued to the application to be issued, so as to implement the online of the target function.
In the method for issuing the function of the application program, the target difference code corresponding to the to-be-issued application identifier of the target function in the function issuing request is obtained, the target difference code is adopted to perform the predetermined operation on the to-be-processed code matched with the target difference code in the target reference code corresponding to the target function, so as to obtain the target code, and the function corresponding to the target code is issued to the to-be-issued application. Therefore, the target code can be ensured to only comprise the universal logic code and the difference code corresponding to the application to be issued. Further, the size of a data packet of the code can be effectively reduced, and the target code can be lightened. Correspondingly, the application to be issued does not need to load the codes of other platforms.
Fig. 5 is a flowchart illustrating a function publishing method of an application program according to a second embodiment of the disclosure, where on the basis of the first embodiment, as shown in fig. 5, step 102 specifically includes:
step 201, according to the function release request, obtaining candidate difference codes of candidate difference code identifications including the application identification to be released from at least one preset candidate difference code.
Step 202, determining the candidate difference code including the to-be-issued application identifier in the candidate difference code identifier as the target difference code.
In this embodiment, for application software to be released of a target function, a plurality of candidate difference codes are written according to personalized requirements corresponding to the target function in each application software. In order to distinguish the difference codes corresponding to different application software, the identification of the application software can be added in the candidate difference code identification. The identification may specifically be provided in a suffix of the candidate difference code. For example, a certain code file identifier in the reference code may be file1.js, and a difference code identifier corresponding to the code file may be file1.diyipingtai. js.
Therefore, after the function release request is obtained, it may be determined that the preset at least one candidate difference code identifier includes a candidate difference code of the to-be-released application identifier, as the target difference code, according to the to-be-released application identifier.
Further, on the basis of the first embodiment, the target difference code identifier includes a name of the target difference code; correspondingly, step 103 specifically includes:
and determining a code to be processed matched with the target difference code in the target reference code according to the name of the target difference code.
In this embodiment, after the target difference codes are determined, for each target difference code, a to-be-processed code corresponding to the target difference code needs to be determined. Specifically, a code to be processed that matches the target difference code may be determined in the target reference code according to the name of the target difference code.
For example, the identification of the target difference code may be File1.diyipingtai. js, that is, the name of the target difference code is File1. Accordingly, a code File named File1 can be determined in the target reference code as a to-be-processed code that the target difference code matches.
It should be noted that a webpack plug-in may also be disposed in the function publishing device of the application program, and further, the determination of the to-be-processed code may be achieved through the webpack.
Fig. 6 is a schematic diagram of a reference code and a candidate difference code provided by the present disclosure, and as shown in fig. 6, the reference code includes all code information for implementing the target function. And aiming at the personalized requirements of each application to be released, the applications to be released respectively correspond to different differential codes. And identifying the application to be issued corresponding to the differentiated code in a suffix mode in the differentiated code.
For example, the predetermined operation may be a replacement operation, and the application to be published may be the first platform. The first platform has two corresponding differential codes: file1.diyipingtai.js, file3. diyipingtai.js. The reference code includes: file1.js, file2.js, file3.js, file4.js, and file5. js. Therefore, the difference codes corresponding to the first platform can be used for replacing file1.js and file3.js in the reference codes, and the target codes to be issued to the first platform are obtained. Fig. 7 is a schematic diagram of an object code provided in an embodiment of the present disclosure, and as shown in fig. 7, the object code includes file1.diyipingtai.js, file2.js, file3.diyipingtai.js, file4.js, and file5. js.
According to the function issuing method of the application program, the target difference code is determined in each candidate difference code according to the to-be-issued application identifier, so that the difference code corresponding to the to-be-issued application can be accurately determined, the matching degree between the target code and the to-be-issued application can be improved, the light weight processing of the code is realized, and the readability of the code is improved.
Fig. 8 is a flowchart illustrating a function issuing method of an application program according to a third embodiment of the present disclosure, where on the basis of any of the foregoing embodiments, as shown in fig. 8, step 104 specifically includes:
step 301, determining a target storage path corresponding to the target difference code.
Step 302, replacing the storage path corresponding to the code to be processed in the target reference code with the target storage path.
In this embodiment, the predetermined operation may specifically be a replacement operation, and the replacement operation of the code to be processed may be implemented by switching a storage path of the code to be processed. Specifically, a target storage path corresponding to the target difference code may be determined. For each code to be processed, the storage path of the code to be processed can be replaced by the target storage path.
Specifically, a webpack plug-in may be further disposed in the function publishing device of the application program, and further, a replacement operation of a storage path corresponding to the to-be-processed code may be implemented through the webpack.
According to the function issuing method of the application program, the target storage path corresponding to the target difference code is adopted to replace the storage path corresponding to the to-be-processed code, so that the target code can be more suitable for the personalized requirement of the to-be-issued application. And the target code is ensured not to comprise differential codes corresponding to other platforms, so that the problem of bloated code data packets is avoided.
Fig. 9 is a schematic flow chart of a function issuing method of an application program according to a fourth embodiment of the present disclosure, where on the basis of any of the foregoing embodiments, as shown in fig. 9, step 104 specifically includes:
step 401, determining a reference relationship between the target difference code and the code to be processed.
And 402, replacing the code to be processed by adopting the target difference code according to the reference relation.
In practical application, a reference relationship may exist between the target difference code and the code to be processed, or the reference relationship may not exist. When the two have a reference relationship, the two may have a partial multiplexing code and a partial difference code. In this case, directly adopting the target difference code to replace the to-be-processed code may cause a problem in the running of the code, and the target function cannot be realized.
Therefore, in order to realize accurate replacement operation of the code to be processed, the reference relationship between the target difference code and the code to be processed needs to be determined first. And replacing the code to be processed by adopting the target difference code according to the reference relation.
Further, on the basis of any of the above embodiments, step 401 specifically includes:
and if the target difference code does not have a reference relation with the code to be processed, replacing the code to be processed by adopting the target difference code.
If the target difference code and the code to be processed have a reference relationship, determining a multiplexing code between the target difference code and the code to be processed; and deleting the multiplexing codes in the codes to be processed to obtain preprocessing codes, and combining the preprocessing codes and the target difference codes.
In this embodiment, when there is no reference relationship between the target difference code and the code to be processed, that is, the target difference code and the code to be processed do not include multiplexed codes. Therefore, in order to improve the readability of the target code, the target code can be directly replaced by the to-be-processed code, the multiplexing code in the to-be-processed code is deleted, the preprocessing code is obtained, and the preprocessing code and the target difference code are combined.
On the contrary, when the target difference code and the code to be processed have a reference relationship, the target difference code and the code to be processed may have a partial multiplexing code. In order to ensure the normal operation of the target code, firstly, the multiplexing code between the target difference code and the code to be processed needs to be determined. And deleting the multiplexing code in the code to be processed to obtain a preprocessing code, and combining the preprocessing code and the target difference code to obtain a target code.
According to the function issuing method of the application program, the reference relation between the target difference code and the code to be processed is determined, and the code to be processed is replaced according to the reference relation, so that the problem that the code cannot normally run due to the fact that the code to be processed is directly replaced can be avoided, and the applicability of the code is guaranteed on the basis of achieving light weight processing of the code.
Fig. 10 is a schematic flow chart of a function issuing method of an application program according to a fifth embodiment of the present disclosure, where on the basis of any of the foregoing embodiments, as shown in fig. 10, step 104 specifically includes:
step 501, determining a code type corresponding to the code to be processed.
And 502, performing preset operation on the code to be processed by adopting the target difference code according to the code type.
In this embodiment, in the process of writing the code, in order to implement different functions, codes of different code types may be adopted. For example, the code of the JS type is specific to the implementation of various logic. The codes of the css type, the less type, the scss type and the ass type are specifically used for realizing front-end display. Therefore, in order to realize accurate replacement operation of the code to be processed, the code type corresponding to the code to be processed can be determined firstly. And replacing the code to be processed by adopting the target difference code according to the code type.
Further, on the basis of any of the above embodiments, step 502 specifically includes:
and if the code type corresponding to the code to be processed is the JS type, replacing the code to be processed by adopting the target difference code.
If the code type corresponding to the code to be processed is any one of a cs type, a less type, a scss type and an ass type, determining an identifier in the target difference code, and performing a predetermined operation on the code to be processed by adopting the target difference code according to the identifier, wherein the identifier is used for indicating the operation type of the code to be processed.
In this embodiment, if the code type corresponding to the code to be processed is the JS type, the target difference code may be directly adopted to perform the replacement operation on the code to be processed.
Optionally, if the code type corresponding to the code is any one of a cs type, a less type, a scs type, and an ass type, the code to be processed may be selected to be replaced, or the code to be processed may be selected to be merged. To determine the specific operation type, an identifier in the target difference code may be determined, from which a replacement operation for the code to be processed is implemented. Wherein the identifier is specifically used for indicating the operation type of the code to be processed.
Further, on the basis of any of the above embodiments, the performing, by using the target difference code according to the identifier, a predetermined operation on the code to be processed includes:
if the identifier indicates that the operation type of the code to be processed is a replacement type, replacing the code to be processed by adopting the target difference code;
and if the identifier indicates that the operation type of the code to be processed is a merging type, merging the target difference code and the replaceable file.
In this embodiment, if the operation type indicated by the identifier is a replacement type, the target difference code may be directly adopted to perform a replacement operation on the code to be processed.
Alternatively, if the operation type indicated by the identifier is a merge type, the target difference code and the code to be processed may be simultaneously retained in the target reference file to obtain the target code.
According to the function issuing method of the application program provided by the embodiment, different predetermined operations are performed on the code to be processed according to the code type corresponding to the code to be processed, so that the flexible diversity of the replacement operation can be realized.
Further, on the basis of any of the above embodiments, the method further includes:
and compiling the object code.
In this embodiment, after obtaining the replaced object code, the object code may be subjected to a compiling operation. The fine-grained difference in the object code can be corrected specifically by the compiling operation.
Further, on the basis of any of the above embodiments, the performing a compiling operation on the object code includes:
and compiling the target code by adopting an environment constant to determine an abnormal code which is not matched with the application to be issued in the target code.
And deleting the abnormal code.
In this embodiment, there often exists a part of common content in the target reference code, and there may exist an abnormal code in the common content that cannot be adapted to each application software, but because the abnormal code is small in size, there is no need to write a differential code for the abnormal code. Therefore, corrections can be made during compilation. For example, the exception code may be a part word in a case.
Specifically, in the compiling process, an environment constant may be used to perform a compiling operation on the object code to determine an abnormal code in the object code that does not match the application to be issued. And for the abnormal code, deleting the abnormal code so as to enable the target code to be completely adapted to the application to be issued. Optionally, the application to be published may also be modified according to its identifier.
For example, the exception code may be a partial word in a case, and the exception code may be deleted in the compiling process, or the word may be adjusted according to the identifier of the application to be issued.
According to the function issuing method of the application program, the abnormal code which is not matched with the application to be issued in the target code is processed in the compiling process, so that the code processing operation through if/else in the code using process can be avoided, and the technical problems of being bloated and not strong in readability are effectively avoided.
Fig. 11 is a schematic flow chart of a function issuing method of an application program according to a sixth embodiment of the present disclosure, where on the basis of any of the foregoing embodiments, as shown in fig. 11, the method further includes:
step 601, obtaining a code editing request, wherein the code editing request comprises a difference code identifier and editing content.
Step 602, according to the code editing request, performing editing operation on the code content and/or the code identifier corresponding to the difference code corresponding to the target difference code identifier.
In this embodiment, in order to improve the applicability of the difference code, the user may further perform an editing operation on the difference code, so that the difference code is applicable to more application software.
Specifically, a code editing request sent by a user may be obtained, where the code editing request includes a difference code identifier and editing content. The code editing request may be sent by the user through the terminal device.
Correspondingly, the user carries out editing operation on the code content and/or the code identification corresponding to the difference code corresponding to the target difference code identification according to the code editing request. The code content is edited, so that the code can realize other functions, and the code identifier is edited, so that the code is suitable for other application software.
According to the function issuing method of the application program, the difference code is edited according to the editing request sent by the user, so that the difference code can be flexibly modified, and the method is suitable for more scenes.
Fig. 12 is a schematic structural diagram of a function issuing apparatus of an application program according to a seventh embodiment of the present disclosure, and as shown in fig. 12, the apparatus includes: a request acquisition module 71, a difference code acquisition module 72, a determination module 73, a processing module 74, and an issuing module 75. The request obtaining module 71 is configured to obtain a function issuing request in an application program, where the function issuing request includes an application identifier to be issued of a target function. A difference code obtaining module 72, configured to obtain, according to the function release request, a target difference code corresponding to the to-be-released application identifier. And the determining module 73 is used for determining the codes to be processed which are matched with the target difference codes in the target reference codes. And the processing module 74 is configured to perform a predetermined operation on the to-be-processed code by using the target difference code, and determine the processed reference code as the target code. The issuing module 75 is configured to issue the target function corresponding to the target code to the application to be issued.
In the function issuing device of the application program provided in this embodiment, the target difference code corresponding to the to-be-issued application identifier of the target function in the function issuing request is acquired, the target difference code is adopted to perform a predetermined operation on the to-be-processed code matched with the target difference code in the target reference code corresponding to the target function, so as to obtain the target code, and the function corresponding to the target code is issued to the to-be-issued application. Therefore, the target code can be ensured to only comprise the universal logic code and the difference code corresponding to the application to be issued. Further, the size of a data packet of the code can be effectively reduced, and the target code can be lightened. Correspondingly, the application to be issued does not need to load the codes of other platforms.
Further, on the basis of the seventh embodiment, the difference code acquiring module includes: a candidate difference code acquiring unit and a determining unit. The candidate difference code acquiring unit is configured to acquire, according to the function release request, a candidate difference code whose candidate difference code identifier includes the application identifier to be released from at least one preset candidate difference code. A determining unit, configured to determine a candidate difference code including the to-be-issued application identifier in the candidate difference code identifier as the target difference code.
Further, on the basis of the seventh embodiment, the target difference code identification includes a name of the target difference code; the determination module is to: and determining a code to be processed matched with the target difference code in the target reference code according to the name of the target difference code.
According to the function issuing device of the application program, the target difference code is determined in each candidate difference code according to the to-be-issued application identifier, so that the difference code corresponding to the to-be-issued application can be accurately determined, the matching degree between the target code and the to-be-issued application can be improved, the light weight processing of the code is realized, and the readability of the code is improved.
Further, on the basis of any of the above embodiments, the processing module includes: a storage path determination unit and a first replacement unit. And the storage path determining unit is used for determining a target storage path corresponding to the target difference code. And the first replacing unit is used for replacing the storage path corresponding to the code to be processed in the target reference code with the target storage path.
According to the function issuing device of the application program, the target storage path corresponding to the target difference code is adopted to replace the storage path corresponding to the to-be-processed code, so that the target code can be more suitable for the personalized requirement of the to-be-issued application. And the target code is ensured not to comprise differential codes corresponding to other platforms, so that the problem of bloated code data packets is avoided.
Further, on the basis of any of the above embodiments, the processing module includes: a reference relationship determination unit and a second replacement unit. And the reference relation determining unit is used for determining the reference relation between the target difference code and the code to be processed. And the second replacing unit is used for replacing the code to be processed by adopting the target difference code according to the reference relation.
Further, on the basis of any of the above embodiments, the second replacement unit is configured to: and if the target difference code does not have a reference relation with the code to be processed, replacing the code to be processed by adopting the target difference code. If the target difference code and the code to be processed have a reference relationship, determining a multiplexing code between the target difference code and the code to be processed; and deleting the multiplexing codes in the codes to be processed to obtain preprocessing codes, and combining the preprocessing codes and the target difference codes.
According to the function issuing device of the application program, the reference relation between the target difference code and the code to be processed is determined, and the code to be processed is replaced according to the reference relation, so that the problem that the code cannot normally run due to the fact that the code to be processed is directly replaced can be avoided, and the applicability of the code is guaranteed on the basis of achieving light weight processing of the code.
Further, on the basis of any of the above embodiments, the processing module includes: a code type unit and a third replacement unit. And the code type unit is used for determining the code type corresponding to the code to be processed. And the third replacing unit is used for performing preset operation on the code to be processed by adopting the target difference code according to the code type.
Further, on the basis of any of the above embodiments, the third replacing unit is configured to: and if the code type corresponding to the code to be processed is the JS type, replacing the code to be processed by adopting the target difference code. If the code type corresponding to the code to be processed is any one of a cs type, a less type, a scss type and an ass type, determining an identifier in the target difference code, and performing a predetermined operation on the code to be processed by adopting the target difference code according to the identifier, wherein the identifier is used for indicating the operation type of the code to be processed.
Further, on the basis of any of the above embodiments, the third replacing unit is configured to: and if the identifier indicates that the operation type of the code to be processed is a replacement type, replacing the code to be processed by adopting the target difference code. And if the identifier indicates that the operation type of the code to be processed is a merging type, merging the target difference code and the replaceable file.
According to the function issuing device of the application program provided by the embodiment, different replacement operations are performed on the code to be processed according to the code type corresponding to the code to be processed, so that the flexible diversity of the replacement operations can be realized.
Further, on the basis of any one of the above embodiments, the apparatus further includes: and the compiling module is used for compiling the object code.
Further, on the basis of any of the above embodiments, the compiling module is configured to: and compiling the target code by adopting an environment constant to determine an abnormal code which is not matched with the application to be issued in the target code. And deleting the abnormal code.
According to the function issuing device of the application program, the abnormal code which is not matched with the application to be issued in the target code is processed in the compiling process, so that the code processing operation through if/else in the code using process can be avoided, and the technical problems of being bloated and poor in readability are effectively avoided.
Further, on the basis of any one of the above embodiments, the apparatus further includes: the device comprises an editing request acquisition module and an editing module. The editing request obtaining module is used for obtaining a code editing request, wherein the code editing request comprises a difference code identifier and editing content. And the editing module is used for editing the code content and/or the code identification corresponding to the difference code corresponding to the target difference code identification according to the code editing request.
According to the function issuing device of the application program provided by the embodiment, the difference code is edited according to the editing request sent by the user, so that the difference code can be flexibly modified and is suitable for more scenes.
The function issuing device of the application program provided in this embodiment may be configured to execute the technical solution of the method embodiment, and the implementation principle and the technical effect of the device are similar, which are not described herein again.
Fig. 13 is a schematic structural diagram of a function issuing device of an application program according to an eighth embodiment of the present disclosure, and as shown in fig. 13, it shows a schematic structural diagram of a function issuing device 800 suitable for implementing the application program according to the eighth embodiment of the present disclosure, where the function issuing device 800 of the application program may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The function issuing device of the application program shown in fig. 13 is only one example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present disclosure.
As shown in fig. 13, the function issuing apparatus 800 of the application program may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage device 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data necessary for the operation of the function issuing device 800 of the application program are also stored. The processing apparatus 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; storage devices 807 including, for example, magnetic tape, hard disk, and the like; and a communication device 808. The communication means 808 may allow the function issuing device 800 of the application program to perform wireless or wired communication with other devices to exchange data. Although fig. 13 shows the function issuing apparatus 800 as an application having various means, it is to be understood that it is not required to implement or have all the means shown. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such embodiments, the computer program may be downloaded and installed from a network through the communication device 908, or installed from the storage device 907, or installed from the ROM 902. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing apparatus 901.
It should be noted that the computer readable storage medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer-readable storage medium may be included in the electronic device; or may exist separately without being assembled into the electronic device.
The computer-readable storage medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In a first aspect, according to one or more embodiments of the present disclosure, there is provided a function issuing method of an application program, including:
acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function;
acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request;
determining a code to be processed matched with the target difference code in the target reference code;
performing preset operation on the code to be processed by adopting the target difference code, and determining a processed reference code as a target code;
and issuing the target function corresponding to the target code to the application to be issued.
According to one or more embodiments of the present disclosure, the obtaining, according to the function release request, a target difference code corresponding to an application identifier to be released includes:
according to the function release request, acquiring candidate difference codes of candidate difference code identifications including the application identification to be released from at least one preset candidate difference code;
and determining the candidate difference codes including the to-be-issued application identifier in the candidate difference code identifiers as the target difference codes.
According to one or more embodiments of the present disclosure, the target difference code identification includes a name of the target difference code;
the determining of the to-be-processed code matched with the target difference code in the target reference code comprises:
and determining a code to be processed matched with the target difference code in the target reference code according to the name of the target difference code.
According to one or more embodiments of the present disclosure, the replacing the to-be-processed code with the target difference code includes:
determining a target storage path corresponding to the target difference code;
and replacing the storage path corresponding to the code to be processed in the target reference code with the target storage path.
According to one or more embodiments of the present disclosure, the replacing the to-be-processed code with the target difference code includes:
determining a reference relationship between the target difference code and the code to be processed;
and replacing the code to be processed by adopting the target difference code according to the reference relation.
According to one or more embodiments of the present disclosure, the replacing the to-be-processed code with the target difference code according to the reference relationship includes:
if the target difference code does not have a reference relation with the code to be processed, replacing the code to be processed by adopting the target difference code;
if the target difference code and the code to be processed have a reference relationship, determining a multiplexing code between the target difference code and the code to be processed; and deleting the multiplexing codes in the codes to be processed to obtain preprocessing codes, and combining the preprocessing codes and the target difference codes.
According to one or more embodiments of the present disclosure, the replacing the to-be-processed code with the target difference code includes:
determining a code type corresponding to the code to be processed;
and performing preset operation on the code to be processed by adopting the target difference code according to the code type.
According to one or more embodiments of the present disclosure, the performing, according to the code type, a replacement operation on the to-be-processed code by using the target difference code includes:
if the code type corresponding to the code to be processed is the JS type, replacing the code to be processed by adopting the target difference code;
if the code type corresponding to the code to be processed is any one of a cs type, a less type, a scss type and an ass type, determining an identifier in the target difference code, and performing a predetermined operation on the code to be processed by adopting the target difference code according to the identifier, wherein the identifier is used for indicating the operation type of the code to be processed.
According to one or more embodiments of the present disclosure, the replacing the to-be-processed code with the target difference code according to the identifier includes:
if the identifier indicates that the operation type of the code to be processed is a replacement type, replacing the code to be processed by adopting the target difference code;
and if the identifier indicates that the operation type of the code to be processed is a merging type, merging the target difference code and the replaceable file.
According to one or more embodiments of the present disclosure, before issuing the target function corresponding to the target code to the application to be issued, the method further includes:
and compiling the object code.
According to one or more embodiments of the present disclosure, the compiling the object code includes:
compiling the target code by adopting an environment constant to determine an abnormal code which is not matched with the application to be issued in the target code;
and deleting the abnormal code.
According to one or more embodiments of the present disclosure, the method further comprises:
acquiring a code editing request, wherein the code editing request comprises a difference code identifier and editing content;
and editing the code content and/or the code identification corresponding to the difference code corresponding to the target difference code identification according to the code editing request.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a function issuing apparatus of an application program, including:
the request acquisition module is used for acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function;
the difference code acquisition module is used for acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request;
the determining module is used for determining a code to be processed matched with the target difference code in the target reference code;
the processing module is used for replacing the code to be processed by adopting the target difference code and determining a replaced reference code as a target code;
and the issuing module is used for issuing the target function corresponding to the target code to the application to be issued.
According to one or more embodiments of the present disclosure, the difference code acquiring module includes:
a candidate difference code obtaining unit, configured to obtain, according to the function release request, a candidate difference code whose candidate difference code identifier includes the application identifier to be released from each candidate difference code;
a determining unit, configured to determine a candidate difference code including the to-be-issued application identifier in the candidate difference code identifier as the target difference code.
According to one or more embodiments of the present disclosure, the target difference code identification includes a name of the target difference code;
the determination module is to:
and determining a code to be processed matched with the target difference code in the target reference code according to the name of the target difference code.
According to one or more embodiments of the present disclosure, the processing module includes:
a storage path determining unit, configured to determine a target storage path corresponding to the target difference code;
and the first replacing unit is used for replacing the storage path corresponding to the code to be processed in the target reference code with the target storage path.
According to one or more embodiments of the present disclosure, the processing module includes:
a reference relation determining unit, configured to determine a reference relation between the target difference code and the code to be processed;
and the second replacing unit is used for replacing the code to be processed by adopting the target difference code according to the reference relation.
According to one or more embodiments of the present disclosure, the second replacement unit is configured to:
if the target difference code does not have a reference relation with the code to be processed, replacing the code to be processed by adopting the target difference code;
if the target difference code and the code to be processed have a reference relationship, determining a multiplexing code between the target difference code and the code to be processed; and deleting the multiplexing codes in the codes to be processed to obtain preprocessing codes, and combining the preprocessing codes and the target difference codes.
According to one or more embodiments of the present disclosure, the processing module includes:
the code type unit is used for determining the code type corresponding to the code to be processed;
and the third replacing unit is used for performing preset operation on the code to be processed by adopting the target difference code according to the code type.
According to one or more embodiments of the present disclosure, the third replacement unit is configured to:
if the code type corresponding to the code to be processed is the JS type, replacing the code to be processed by adopting the target difference code;
if the code type corresponding to the code to be processed is any one of a cs type, a less type, a scss type and an ass type, determining an identifier in the target difference code, and performing a replacement operation on the code to be processed by adopting the target difference code according to the identifier, wherein the identifier is used for indicating a replacement mode of the code to be processed.
According to one or more embodiments of the present disclosure, the third replacement unit is configured to:
if the identifier indicates that the replacement mode of the code to be processed is a replacement type, replacing the code to be processed by adopting the target difference code;
and if the identifier indicates that the replacement mode of the code to be processed is a merging type, merging the target difference code and the replaceable file.
According to one or more embodiments of the present disclosure, the apparatus further comprises:
and the compiling module is used for compiling the object code.
According to one or more embodiments of the present disclosure, the compiling module is configured to:
compiling the target code by adopting an environment constant to determine an abnormal code which is not matched with the application to be issued in the target code;
and deleting the abnormal code.
According to one or more embodiments of the present disclosure, the apparatus further comprises:
the editing request acquiring module is used for acquiring a code editing request, wherein the code editing request comprises a difference code identifier and editing content;
and the editing module is used for editing the code content and/or the code identification corresponding to the difference code corresponding to the target difference code identification according to the code editing request.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided a function issuing apparatus of an application program, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of function distribution of an application program as described above in the first aspect and in various possible designs of the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the function distribution method of the application program according to the first aspect and various possible designs of the first aspect is implemented.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (20)

1. A method for issuing a function of an application program, comprising:
acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function;
acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request;
determining a code to be processed matched with the target difference code in the target reference code;
performing preset operation on the code to be processed by adopting the target difference code, and determining a processed reference code as a target code;
and issuing the target function corresponding to the target code to the application to be issued.
2. The method according to claim 1, wherein the obtaining, according to the function release request, a target difference code corresponding to an application identifier to be released comprises:
according to the function release request, acquiring candidate difference codes of candidate difference code identifications including the application identification to be released from at least one preset candidate difference code;
and determining the candidate difference codes including the to-be-issued application identifier in the candidate difference code identifiers as the target difference codes.
3. The method of claim 1, wherein the target difference code identification comprises a name of the target difference code;
the determining of the to-be-processed code matched with the target difference code in the target reference code comprises:
and determining a code to be processed matched with the target difference code in the target reference code according to the name of the target difference code.
4. The method according to claim 1, wherein the performing the predetermined operation on the to-be-processed code by using the target difference code comprises:
determining a target storage path corresponding to the target difference code;
and replacing the storage path corresponding to the code to be processed in the target reference code with the target storage path.
5. The method according to claim 1, wherein the performing the predetermined operation on the to-be-processed code by using the target difference code comprises:
determining a reference relationship between the target difference code and the code to be processed;
and replacing the code to be processed by adopting the target difference code according to the reference relation.
6. The method according to claim 5, wherein performing the predetermined operation on the to-be-processed code by using the target difference code according to the reference relationship comprises:
if the target difference code does not have a reference relation with the code to be processed, replacing the code to be processed by adopting the target difference code;
if the target difference code and the code to be processed have a reference relationship, determining a multiplexing code between the target difference code and the code to be processed; and deleting the multiplexing codes in the codes to be processed to obtain preprocessing codes, and combining the preprocessing codes and the target difference codes.
7. The method according to claim 1, wherein the performing the predetermined operation on the to-be-processed code by using the target difference code comprises:
determining a code type corresponding to the code to be processed;
and performing preset operation on the code to be processed by adopting the target difference code according to the code type.
8. The method according to claim 7, wherein performing the predetermined operation on the to-be-processed code with the target difference code according to the code type comprises:
if the code type corresponding to the code to be processed is the JS type, replacing the code to be processed by adopting the target difference code;
if the code type corresponding to the code to be processed is any one of a cs type, a less type, a scss type and an ass type, determining an identifier in the target difference code, and performing a predetermined operation on the code to be processed by adopting the target difference code according to the identifier, wherein the identifier is used for indicating the operation type of the code to be processed.
9. The method according to claim 8, wherein the performing the predetermined operation on the to-be-processed code with the target difference code according to the identifier comprises:
if the identifier indicates that the operation type of the code to be processed is a replacement type, replacing the code to be processed by adopting the target difference code;
and if the identifier indicates that the operation type of the code to be processed is a merging type, merging the target difference code and the file to be processed.
10. The method according to any one of claims 1 to 9, wherein before the issuing the target function corresponding to the target code to the application to be issued, the method further includes:
and compiling the object code.
11. The method of claim 10, wherein said compiling the object code comprises:
compiling the target code by adopting an environment constant to determine an abnormal code which is not matched with the application to be issued in the target code;
and deleting the abnormal code.
12. The method according to any one of claims 1-9, further comprising:
acquiring a code editing request, wherein the code editing request comprises a difference code identifier and editing content;
and editing the code content and/or the code identification corresponding to the difference code corresponding to the target difference code identification according to the code editing request.
13. A function issuing apparatus for an application program, comprising:
the request acquisition module is used for acquiring a function issuing request in an application program, wherein the function issuing request comprises an application identifier to be issued of a target function;
the difference code acquisition module is used for acquiring a target difference code corresponding to the application identifier to be issued according to the function issuing request;
the determining module is used for determining a code to be processed matched with the target difference code in the target reference code;
the processing module is used for carrying out preset operation on the code to be processed by adopting the target difference code and determining the processed reference code as a target code;
and the issuing module is used for issuing the target function corresponding to the target code to the application to be issued.
14. The apparatus of claim 13, wherein the difference code obtaining module comprises:
a candidate difference code obtaining unit, configured to obtain, according to the function release request, a candidate difference code whose candidate difference code identifier includes the application identifier to be released from each candidate difference code;
a determining unit, configured to determine a candidate difference code including the to-be-issued application identifier in the candidate difference code identifier as the target difference code.
15. The apparatus of claim 13, wherein the processing module comprises:
a storage path determining unit, configured to determine a target storage path corresponding to the target difference code;
and the first replacing unit is used for replacing the storage path corresponding to the code to be processed in the target reference code with the target storage path.
16. The apparatus of claim 13, wherein the processing module comprises:
the code type unit is used for determining the code type corresponding to the code to be processed;
and the third replacing unit is used for replacing the code to be processed by adopting the target difference code according to the code type.
17. The apparatus of claim 16, wherein the third replacement unit is configured to:
if the code type corresponding to the code to be processed is the JS type, replacing the code to be processed by adopting the target difference code;
if the code type corresponding to the code to be processed is any one of a cs type, a less type, a scss type and an ass type, determining an identifier in the target difference code, and performing a predetermined operation on the code to be processed by adopting the target difference code according to the identifier, wherein the identifier is used for indicating the operation type of the code to be processed.
18. The apparatus of any one of claims 13-17, further comprising:
the editing request acquiring module is used for acquiring a code editing request, wherein the code editing request comprises a difference code identifier and editing content;
and the editing module is used for editing the code content and/or the code identification corresponding to the difference code corresponding to the target difference code identification according to the code editing request.
19. A function issuing apparatus for an application program, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of function issuing of the application program according to any one of claims 1 to 12.
20. A computer-readable storage medium, characterized in that a computer-executable instruction is stored therein, which when executed by a processor, implements the function issuing method of an application program according to any one of claims 1 to 12.
CN202011371036.2A 2020-11-30 2020-11-30 Application function issuing method, device, equipment and storage medium Pending CN112416426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011371036.2A CN112416426A (en) 2020-11-30 2020-11-30 Application function issuing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011371036.2A CN112416426A (en) 2020-11-30 2020-11-30 Application function issuing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112416426A true CN112416426A (en) 2021-02-26

Family

ID=74830532

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011371036.2A Pending CN112416426A (en) 2020-11-30 2020-11-30 Application function issuing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112416426A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555535A (en) * 2024-01-09 2024-02-13 云筑信息科技(成都)有限公司 Method for realizing multi-environment code multiplexing in compact framework

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630569A (en) * 2015-12-17 2016-06-01 北京金山安全软件有限公司 Software source code processing method and device and electronic equipment
CN108427731A (en) * 2018-02-26 2018-08-21 平安普惠企业管理有限公司 Processing method, device, terminal device and the medium of page code
CN109739524A (en) * 2019-01-09 2019-05-10 北京字节跳动网络技术有限公司 A kind of generation method, device, electronic equipment and the storage medium of software installation packet
CN111045683A (en) * 2019-12-13 2020-04-21 深圳前海微众银行股份有限公司 Applet code compiling method, device, equipment and medium
CN111610978A (en) * 2020-05-19 2020-09-01 中国建设银行股份有限公司 Applet conversion method, device, equipment and storage medium
CN111638873A (en) * 2020-05-21 2020-09-08 平安普惠企业管理有限公司 Program code generation method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630569A (en) * 2015-12-17 2016-06-01 北京金山安全软件有限公司 Software source code processing method and device and electronic equipment
CN108427731A (en) * 2018-02-26 2018-08-21 平安普惠企业管理有限公司 Processing method, device, terminal device and the medium of page code
CN109739524A (en) * 2019-01-09 2019-05-10 北京字节跳动网络技术有限公司 A kind of generation method, device, electronic equipment and the storage medium of software installation packet
CN111045683A (en) * 2019-12-13 2020-04-21 深圳前海微众银行股份有限公司 Applet code compiling method, device, equipment and medium
CN111610978A (en) * 2020-05-19 2020-09-01 中国建设银行股份有限公司 Applet conversion method, device, equipment and storage medium
CN111638873A (en) * 2020-05-21 2020-09-08 平安普惠企业管理有限公司 Program code generation method and device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555535A (en) * 2024-01-09 2024-02-13 云筑信息科技(成都)有限公司 Method for realizing multi-environment code multiplexing in compact framework
CN117555535B (en) * 2024-01-09 2024-05-14 云筑信息科技(成都)有限公司 Method for realizing multi-environment code multiplexing in compact framework

Similar Documents

Publication Publication Date Title
CN109491742B (en) Page table rendering method and device
CN114491349B (en) Page display method, page display device, electronic device, storage medium and program product
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN111241823A (en) Dependency configuration management method and device, electronic equipment and storage medium
CN110781658A (en) Resume analysis method and device, electronic equipment and storage medium
CN111124541B (en) Configuration file generation method, device, equipment and medium
CN110806834A (en) Information processing method and device based on input method, electronic equipment and medium
CN112416426A (en) Application function issuing method, device, equipment and storage medium
CN109683726B (en) Character input method, character input device, electronic equipment and storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN111309406A (en) Event processing method and device of application program and electronic equipment
CN113807056B (en) Document name sequence error correction method, device and equipment
CN111027281B (en) Word segmentation method, device, equipment and storage medium
CN115167822A (en) Branch code merging method, device, equipment and storage medium
CN110968334B (en) Application resource updating method, resource package manufacturing method, device, medium and equipment
CN110113416B (en) Method and device for displaying information
CN112333462A (en) Live broadcast room page jumping method, returning device and electronic equipment
CN112311842A (en) Method and device for information interaction
CN114969302A (en) Label searching method and device
CN116360710B (en) Data storage method applied to server cluster, electronic device and readable medium
CN110619079A (en) Method and device for pushing information
US11902340B2 (en) Data processing method, apparatus, electronic device and storage medium
CN113282853B (en) Comment preloading method and device, storage medium and electronic equipment
US20240095633A1 (en) Method for determining a project flow, electronic device, and storage medium
CN111209225B (en) Method, device, medium and electronic equipment for acquiring real address

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