CN110399161B - Mapping relation generation method, calling method and device - Google Patents

Mapping relation generation method, calling method and device Download PDF

Info

Publication number
CN110399161B
CN110399161B CN201910515189.0A CN201910515189A CN110399161B CN 110399161 B CN110399161 B CN 110399161B CN 201910515189 A CN201910515189 A CN 201910515189A CN 110399161 B CN110399161 B CN 110399161B
Authority
CN
China
Prior art keywords
file
calling
protocol
component
called
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910515189.0A
Other languages
Chinese (zh)
Other versions
CN110399161A (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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN201910515189.0A priority Critical patent/CN110399161B/en
Publication of CN110399161A publication Critical patent/CN110399161A/en
Application granted granted Critical
Publication of CN110399161B publication Critical patent/CN110399161B/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/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/73Program documentation

Abstract

The invention discloses a generation method, a calling method and a device of a mapping relation, wherein all files in development engineering are divided into a plurality of function folders according to function characteristics, each function folder is packaged into a component, when judging that the files in a designated component need to be called by other components, a protocol corresponding to the called files is created, the mapping relation between the called files and the corresponding protocols is established, and when the designated component is called by the other components, the calling method corresponding to the files in the designated component is called by the other components according to the protocols in the mapping relation. According to the method provided by the embodiment of the invention, when the components are called, the called file is not required to be imported into the main calling component, and only the calling method corresponding to the file is required to be called, so that the conflict is effectively prevented, the coupling relation between the components is avoided, and the development efficiency is improved.

Description

Mapping relation generation method, calling method and device
Technical Field
The present invention relates to the field of software development technologies, and in particular, to a mapping relationship generating method, a mapping relationship calling method, and a mapping relationship calling device.
Background
With the continuous development of an APP, more and more services are incorporated therebetween, so that the functions of the APP are more and more complex. In order to be able to cope with this situation more gracefully, it is necessary to modularize the APP during the software development phase. The software is partitioned, organized, and packaged by modular processing to form a plurality of business modules. Each business module completes a specific function, and all business modules are assembled into a whole according to a specific method, so that all functions required by the whole software are completed.
A common method for modularly processing software is to divide files contained in a software development project into a plurality of folders according to functions to be implemented, and the files in each folder are used for implementing one function. If a certain function needs to use files under other folders, communication is needed through corresponding interfaces so as to directly distinguish and isolate each service and each component of the software.
However, when the method is adopted to carry out modularized processing on software, files for realizing certain functions are divided into a plurality of different folders, and the functions need to call the files in the folders in the implementation process, so that a great number of coupling conditions exist among the different functions.
Disclosure of Invention
The invention provides a generation method, a calling method and a device of a mapping relation, which are used for solving the problem that multiple coupling conditions exist in calling among files when the existing method is adopted for modularized development.
In a first aspect, the present invention provides a method for generating a mapping relationship, which is applied to a system, and includes the following steps:
dividing all files in the development project into a plurality of functional folders according to the functional characteristics;
packaging each of the function folders into a component;
if the file in the appointed component needs to be called by other components, creating a protocol corresponding to the called file, wherein the protocol is used for providing the name of a calling method adopted when one file is called;
and establishing a mapping relation between the called file and the corresponding protocol, wherein the mapping relation is used for calling a calling method corresponding to the file in the designated component by other components according to the protocol in the mapping relation when the designated component is called by other components.
Further, the packaging each function folder as a component includes:
creating a management library for managing and storing the function folders, wherein the function folders and the management library are in one-to-one correspondence;
and packaging each function folder and the corresponding management library into a component.
Further, if the file inside the designated component needs to be called by other components, creating a protocol corresponding to the called file, including:
acquiring a source code of each file;
splitting the designated component using the source code;
if a split failure instruction is received, creating a protocol corresponding to the called file.
Further, the mapping relation between the file and the corresponding protocol comprises a protocol-file form and is stored in a management library; and a calling method for calling the file is stored in the protocol.
In a second aspect, the present invention further provides a method for calling a mapping relationship, which is applied to a component, and includes the following steps:
receiving a call instruction which is sent by a system and used for calling a designated component, wherein the designated component stores a mapping relation between a file and a corresponding protocol;
acquiring a protocol in the mapping relation according to the calling instruction, wherein the protocol is used for providing the name of a calling method adopted when a file is called;
and calling a calling method corresponding to the file in the designated component according to the name, wherein the calling method is stored in a protocol, and the calling method is used for calling the file.
In a third aspect, an embodiment of the present invention provides a mapping relationship generating apparatus, which is applied to a system, including:
the division module is used for dividing all files in the development project into a plurality of functional folders according to the functional characteristics;
the component packaging module is used for packaging each function folder into a component;
the protocol creation module is used for creating a protocol corresponding to the called file when the file in the designated component needs to be called by other components, and the protocol is used for providing the name of a calling method adopted when one file is called;
the system comprises a mapping relation establishing module, a calling module and a calling module, wherein the mapping relation establishing module is used for establishing a mapping relation between a called file and a corresponding protocol, and the mapping relation is used for calling a calling method corresponding to the file in a designated component by the other component according to the protocol in the mapping relation when the designated component is called by the other component.
Further, the component packaging module includes:
the management library creation unit is used for creating a management library for managing and storing the function folders, and the function folders are in one-to-one correspondence with the management library;
and the component packaging unit is used for packaging each functional folder and the corresponding management library into a component.
Further, the protocol creation module includes:
the acquisition unit is used for acquiring the source code of each file;
the splitting unit is used for splitting the appointed component by utilizing the source code;
and the protocol creation unit is used for creating a protocol corresponding to the called file if a splitting failure instruction is received.
Further, the mapping relation between the file and the corresponding protocol comprises a protocol-file form and is stored in a management library; and a calling method for calling the file is stored in the protocol.
In a fourth aspect, an embodiment of the present invention provides a mapping relationship calling device, which is applied to a component, and includes:
the instruction receiving module is used for receiving a call instruction which is sent by the system and used for calling a designated component, wherein the designated component stores a mapping relation between a file and a corresponding protocol;
the protocol acquisition module is used for acquiring a protocol in the mapping relation according to the calling instruction, wherein the protocol is used for providing the name of a calling method adopted when a file is called;
and the calling module is used for calling a calling method corresponding to the file in the designated component according to the name, the calling method is stored in a protocol, and the calling method is used for calling the file.
In a fifth aspect, the present invention also provides an electronic device, including:
a memory for storing program instructions;
and the processor is used for calling and executing the program instructions in the memory so as to realize the generation method of the mapping relation in the first aspect.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including:
a memory for storing program instructions;
and the processor is used for calling and executing the program instructions in the memory so as to realize the calling method of the mapping relation in the second aspect.
In a seventh aspect, an embodiment of the present invention provides a storage medium, where a computer program is stored, and when at least one processor of the mapping relation generating apparatus executes the computer program, the mapping relation generating apparatus executes the mapping relation generating method described in the first aspect.
In an eighth aspect, an embodiment of the present invention provides a storage medium, where a computer program is stored, and when at least one processor of a mapping relation calling device executes the computer program, the mapping relation calling device executes the mapping relation calling method described in the second aspect.
As can be seen from the above technical solutions, in the generating method, calling method and apparatus for a mapping relationship provided by the embodiments of the present invention, all files in a development project are divided into multiple function folders according to function features, each function folder is packaged into a component, when it is determined that a file in a specified component needs to be called by another component, a protocol corresponding to the called file is created, and a mapping relationship between the called file and the corresponding protocol is established, so that when the specified component is called by another component, the other component calls a calling method corresponding to the file in the specified component according to the protocol in the mapping relationship. According to the method provided by the embodiment of the invention, when the components are called, the called file is not required to be imported into the main calling component, and only the calling method corresponding to the file is required to be called, so that the conflict is effectively prevented, the coupling relation between the components is avoided, and the development efficiency is improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of a method for generating a mapping relationship according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of packaging an assembly according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for creating a protocol according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of communication interaction between modules according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an inter-component call provided by an embodiment of the present invention;
FIG. 6 is a flowchart of a method for calling a mapping relationship according to an embodiment of the present invention;
fig. 7 is a block diagram of a mapping relationship generating device according to an embodiment of the present invention;
FIG. 8 is a block diagram of a mapping relation calling device according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a hardware structure of another electronic device according to an embodiment of the present invention.
Detailed Description
Fig. 1 is a flowchart of a mapping relation generation method provided in an embodiment of the present invention.
The method for generating the mapping relation is applied to a software development stage, and an execution subject is a system. In the software development stage, the APP needs to be subjected to modularized processing, so that a plurality of service modules obtained after processing can operate relatively independently, and the coupling between the service modules is reduced. Therefore, when the APP is subjected to modularized processing, a mapping relation needs to be established, so that when a component obtained by packaging a certain service module needs to call files in other components, the file does not need to be added into a main call component, and only a call method corresponding to the required file needs to be called according to the mapping relation, the phenomenon of multiple coupling existing during calling among the files is avoided, and the development efficiency is improved.
Specifically, as shown in fig. 1, the method for generating a mapping relationship provided by the embodiment of the present invention includes the following steps:
s11, dividing all files in the development project into a plurality of functional folders according to the functional characteristics.
In the software development stage, each APP is formed by splicing a plurality of files, each file correspondingly provides a function, and a plurality of required functions are combined together to form the complete APP.
Therefore, when the modularization processing is performed, the embodiment adopts a mode of dividing according to the functional characteristics, and the files corresponding to each function are divided into one functional folder, so that the functions corresponding to all the files in the functional folder are the same kind of characteristics, and the physical isolation of the files is realized.
S12, packaging each function folder into a component.
Each function folder is used for providing a function, and is packaged into a separate component for convenient calling and avoiding the phenomenon of coupling with other function folders. Wherein, the components are containers formed by simply packaging one function, and each component corresponds to one specific function.
Specifically, as shown in fig. 2, the present embodiment encapsulates each function folder as one component according to the following steps:
s121, creating a management library for managing and storing the function folders, wherein the function folders and the management library are in one-to-one correspondence.
In the existing modularized development process, files for realizing certain functions are separated into a plurality of different folders, and no home manager exists, so that the development efficiency is low. Therefore, after the files are divided into the function folders according to the function characteristics, in order to enable each file to have an own manager, in this embodiment, a management library is created for each function folder, and the function folders are put into the management library for code storage, so that one management library correspondingly manages one function folder, and conflicts between the files can be effectively prevented.
S122, packaging each function folder and the corresponding management library into a component.
After each function folder has an independent management library, the function folder and the management library are packaged to form an independent component, and the component can protect internal files and files which do not need to be called by another component, so that safety is enhanced.
S13, if the files in the designated component are required to be called by other components, creating a protocol corresponding to the called files, wherein the protocol is used for providing the name of a calling method adopted when one file is called.
Because each APP has many functions in the software development stage, a certain component can call another component, but the calling process can lead to high coupling between files, and the development efficiency is low. To solve this problem, it is necessary to check whether a certain component calls a file of another component, and if there is a case of calling a file in another component, this embodiment solves the problem that the file must be added to the component at the time of calling by creating a protocol corresponding to the called file.
The name of the calling method used for calling the file is stored in the protocol, and the name is a uniform name for representing the calling method corresponding to the called file and related parameters. When a certain component needs to call a file in the component, the calling method can be directly called according to the name, and the function corresponding to the file can be called without adding the file into the component, so that the coupling between the files can be reduced.
For this purpose, as shown in fig. 3, the present embodiment determines whether a file inside a component is called by other components according to the following method, and if a file inside a specified component needs to be called by other components, creates a protocol corresponding to the called file:
s131, acquiring source codes of the files.
S132, splitting the designated component by utilizing the source code.
S133, if a splitting failure instruction is received, creating a protocol corresponding to the called file.
When judging whether the file is called by other components, the source code of each file in the component needs to be acquired, each section of source code corresponds to a function, and the component is split according to the source code.
In the application, if the component can be split according to the source code, the condition that the file in the component is not called is described; if the component cannot be split according to the source code, then the condition that the file is called exists in the component is explained.
Thus, if the system receives a split failure instruction, it means that the file is called by other components, and thus, a protocol corresponding to the file needs to be established.
When the method is used for calling, the protocol is utilized to realize the calling of the corresponding files, the files are not required to be added into a main calling component, and the problem of high coupling degree between the files is solved.
S14, establishing a mapping relation between the called file and the corresponding protocol, wherein the mapping relation is used for calling a calling method corresponding to the file in the designated component by other components according to the protocol in the mapping relation when the designated component is called by other components.
Each file in the component has a corresponding protocol, and a mapping relation is established between the file and the protocol. The mapping relation between the file and the corresponding protocol comprises a protocol-file form and is stored in a management library; the protocol stores a calling method for realizing the calling of the file.
Each mapping relation is stored in the affiliated management library, when the main calling component needs to call a file in another component, the mapping relation is called according to the called file, a corresponding protocol is found, and then a calling method for realizing the corresponding function of the file is called, and the file is not required to be added into the main calling component, so that the coupling between the files is avoided.
As can be seen from the above technical solutions, in the mapping relation generating method provided by the embodiments of the present invention, all files in a development project are divided into multiple function folders according to function features, each function folder is packaged into a component, when it is determined that a file in a specified component needs to be called by another component, a protocol corresponding to the called file is created, and a mapping relation between the called file and the corresponding protocol is established, so that when the specified component is called by another component, a calling method corresponding to the file in the specified component is called by the other component according to the protocol in the mapping relation. According to the method provided by the embodiment of the invention, when the components are called, the called file is not required to be imported into the main calling component, and only the calling method corresponding to the file is required to be called, so that the conflict is effectively prevented, the coupling relation between the components is avoided, and the development efficiency is improved.
As shown in fig. 4, in the modular development process, after the files in the development stage are functionally packaged into different components, each component interacts with other modules. Each component 302 is provided with an API interface 301, and the API interface 301 is used to communicate with other modules. When the external communication is performed, the external communication sends an instruction through the interactive frame 101, the login checking module 102 determines whether the instruction meets the requirement, if the instruction meets the requirement, the instruction is communicated with the component 302 through the API interface 301, and if the instruction does not meet the requirement, the login checking module intercepts the instruction and prevents the external communication with the component 302.
When communication is performed in the APP, namely, when communication is performed between components, a main calling component calls a file of a designated component through an access control 201, when specific calling is performed, a calling process is shown in fig. 5, a protocol 202 and an API interface 301 corresponding to each component are stored in a management library 400, the main calling component decouples the component 302 according to the protocol 202, and calling of the corresponding file is realized through the API interface 301 provided by the component 302. In addition, when the main calling component communicates with the designated component, the main calling component also needs to judge through the login checking module, and only when the access instruction meets the requirement, the main calling component communicates with the component 302, and the step of calling the file is continuously executed.
Specifically, as shown in fig. 6, in order to implement calling of a corresponding file in a component, an embodiment of the present invention provides a method for calling a mapping relationship, which is applied to a component, and includes the following steps:
s21, receiving a call instruction which is sent by the system and used for calling the designated component, wherein the designated component stores a mapping relation between the file and the corresponding protocol.
When a file of a certain component needs to be called, a calling instruction is sent to a main calling component by a system, and the main calling component calls the file in a designated component according to the calling instruction.
The management library in the appointed component stores the mapping relation established by each file and the protocol, and is used for realizing the calling of the corresponding file.
S22, acquiring a protocol in the mapping relation according to the calling instruction, wherein the protocol is used for providing the name of a calling method adopted when a file is called.
The calling instruction sent by the system carries parameters which need to call the designated file, the main calling component selects the mapping relation with the parameters in the designated file according to the parameters, and selects the protocol corresponding to the file in the mapping relation.
The protocol is used for providing a name, and the name corresponds to the calling method and related parameters of the file, so that the calling of the target file can be realized.
S23, calling a calling method corresponding to the file in the designated component according to the name, wherein the calling method is stored in the protocol, and the calling method is used for calling the file.
The mapping relation of the protocol is stored in the appointed component, a calling method is stored in the protocol, the main calling component directly calls the calling method stored in the appointed component according to the name stored in the protocol, and the calling method can realize the calling of the corresponding file.
In this embodiment, the protocol corresponds to an API interface, and is used to implement a calling procedure between two components. When one component calls a file in the other component, a specific file cannot be imported only by calling a calling method corresponding to the corresponding file according to a protocol, so that the compiling time of a program can be reduced, the high coupling between the files is reduced, and the development efficiency is improved.
According to the technical scheme, after a plurality of files are packaged into the components according to the functions, and the mapping relation between the files and the protocols is stored in the components, the main calling component acquires the protocols in the mapping relation according to the calling instructions, and then calls the calling method corresponding to the files according to the names provided by the protocols, so that the calling of the files is realized, the called files are not required to be imported into the main calling component, only the calling method corresponding to the files is required to be called, the conflict can be effectively prevented, the coupling relation among the components is avoided, and the development efficiency is improved.
As shown in fig. 7, an embodiment of the present invention provides a mapping relation generating device, applied to a system, for executing relevant steps of the mapping relation generating method shown in fig. 1, where the device includes: a dividing module 110, configured to divide all files in the development project into a plurality of functional folders according to the functional characteristics; a component packaging module 120, configured to package each of the function folders into a component; a protocol creation module 130, configured to create, when a file in the specified component needs to be called by another component, a protocol corresponding to the called file, where the protocol is used to provide a name of a calling method adopted when a file is called; the mapping relation establishing module 140 is configured to establish a mapping relation between a called file and a corresponding protocol, where the mapping relation is used to call, by another component, a call method corresponding to the file in the designated component according to the protocol in the mapping relation when the designated component is called by the other component.
Further, the component packaging module 120 includes: the management library creation unit is used for creating a management library for managing and storing the function folders, and the function folders are in one-to-one correspondence with the management library; and the component packaging unit is used for packaging each functional folder and the corresponding management library into a component.
Further, the protocol creation module 130 includes: the acquisition unit is used for acquiring the source code of each file;
the splitting unit is used for splitting the appointed component by utilizing the source code; and the protocol creation unit is used for creating a protocol corresponding to the called file if a splitting failure instruction is received.
Further, the mapping relation between the file and the corresponding protocol comprises a protocol-file form and is stored in a management library; and a calling method for calling the file is stored in the protocol.
As shown in fig. 8, an embodiment of the present invention provides a mapping relation calling device, applied to a component, for executing relevant steps of a mapping relation generating method shown in fig. 6, where the device includes: the instruction receiving module 210 is configured to receive a call instruction sent by the system and used for calling a specified component, where a mapping relationship between a file and a corresponding protocol is stored in the specified component; a protocol obtaining module 220, configured to obtain a protocol in the mapping relationship according to the call instruction, where the protocol is used to provide a name of a call method adopted when a file is called; and a calling module 230, configured to call, according to the name, a calling method corresponding to the file in the specified component, where the calling method is stored in a protocol, and the calling method is used to implement calling of the file.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention. As shown in fig. 9, the present invention further provides an electronic device, including: a memory 611 for storing program instructions; and a processor 612, configured to call and execute the program instructions in the memory, so as to implement the mapping relation generating method described in the foregoing embodiment. Reference may be made in particular to the relevant description of the previous embodiments.
In this embodiment, the processor 612 and the memory 611 may be connected by a bus or other means. The processor may be a general-purpose processor, such as a central processing unit, a digital signal processor, an application specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention. The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk.
Fig. 10 is a schematic diagram of a hardware structure of another electronic device according to an embodiment of the present invention. As shown in fig. 10, the present invention further provides an electronic device, including: a memory 621 for storing program instructions; and a processor 622, configured to call and execute the program instructions in the memory, so as to implement the mapping relation calling method described in the foregoing embodiment. Reference may be made in particular to the relevant description of the previous embodiments.
In this embodiment, the processor 622 and the memory 621 may be connected by a bus or other means. The processor may be a general-purpose processor, such as a central processing unit, a digital signal processor, an application specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention. The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk.
The embodiment of the invention also provides a storage medium, in which a computer program is stored, and when at least one processor of the mapping relation generating device executes the computer program, the mapping relation generating device executes the mapping relation generating method described in the above embodiment.
The embodiment of the invention also provides a storage medium, which is characterized in that the storage medium stores a computer program, and when at least one processor of the mapping relation calling device executes the computer program, the mapping relation calling device executes the mapping relation calling method described in the embodiment.
The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (random access memory, RAM), or the like.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for the embodiments of the generation device of the mapping relationship and the calling device of the mapping relationship, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant points are referred to the description in the method embodiments.
The embodiments of the present invention described above do not limit the scope of the present invention.

Claims (12)

1. The generation method of the mapping relation is applied to a system and is characterized by comprising the following steps:
dividing all files in the development project into a plurality of functional folders according to the functional characteristics;
packaging each of the function folders into a component;
if the file in the designated component needs to be called by other components, creating a protocol corresponding to the called file, wherein the protocol is used for providing the name of a calling method adopted when one file is called;
establishing a mapping relation between the called file and a corresponding protocol, wherein the mapping relation is used for calling a calling method corresponding to the file in the designated component by other components according to the protocol in the mapping relation when the designated component is called by other components; wherein, the liquid crystal display device comprises a liquid crystal display device,
if the file in the designated component needs to be called by other components, creating a protocol corresponding to the called file, including:
acquiring a source code of each file;
splitting the designated component using the source code;
if a split failure instruction is received, creating a protocol corresponding to the called file.
2. The method of claim 1, wherein said encapsulating each function folder as a component comprises:
creating a management library for managing and storing the function folders, wherein the function folders and the management library are in one-to-one correspondence;
and packaging each function folder and the corresponding management library into a component.
3. The method of claim 1, wherein the mapping between the file and the corresponding protocol comprises a protocol-file format and is stored in a management library; and a calling method for calling the file is stored in the protocol.
4. A method for calling a mapping relation is applied to a component and is characterized by comprising the following steps:
receiving a call instruction which is sent by a system and used for calling a designated component, wherein the designated component stores a mapping relation between a file and a corresponding protocol;
acquiring a protocol in the mapping relation according to the calling instruction, wherein the protocol is used for providing the name of a calling method adopted when a file is called;
calling a calling method corresponding to the file in the designated component according to the name, wherein the calling method is stored in a protocol and is used for calling the file; wherein, the liquid crystal display device comprises a liquid crystal display device,
the system acquires the source code of each file when judging whether the file is called by a designated component; splitting the designated component using the source code; if a split failure instruction is received, determining that the file is called by a designated component, and creating a protocol corresponding to the called file.
5. A mapping relation generating device, applied to a system, characterized by comprising:
the division module is used for dividing all files in the development project into a plurality of functional folders according to the functional characteristics;
the component packaging module is used for packaging each function folder into a component;
the protocol creation module is used for creating a protocol corresponding to a file to be called when the file in the designated component needs to be called by other components, wherein the protocol is used for providing the name of a calling method adopted when one file is called;
the system comprises a mapping relation establishing module, a calling module and a calling module, wherein the mapping relation establishing module is used for establishing a mapping relation between a called file and a corresponding protocol, and the mapping relation is used for calling a calling method corresponding to the file in a designated component by the other component according to the protocol in the mapping relation when the designated component is called by the other component; wherein, the liquid crystal display device comprises a liquid crystal display device,
the protocol creation module includes:
the acquisition unit is used for acquiring the source code of each file;
the splitting unit is used for splitting the appointed component by utilizing the source code;
and the protocol creation unit is used for creating a protocol corresponding to the called file if a splitting failure instruction is received.
6. The apparatus of claim 5, wherein the component encapsulates a module comprising:
the management library creation unit is used for creating a management library for managing and storing the function folders, and the function folders are in one-to-one correspondence with the management library;
and the component packaging unit is used for packaging each functional folder and the corresponding management library into a component.
7. The apparatus of claim 5, wherein the mapping between the file and the corresponding protocol comprises a protocol-file format and is stored in a management library; and a calling method for calling the file is stored in the protocol.
8. A mapping relation calling device applied to a component, comprising:
the instruction receiving module is used for receiving a call instruction which is sent by the system and used for calling a designated component, wherein the designated component stores a mapping relation between a file and a corresponding protocol;
the protocol acquisition module is used for acquiring a protocol in the mapping relation according to the calling instruction, wherein the protocol is used for providing the name of a calling method adopted when a file is called;
the calling module is used for calling a calling method corresponding to the file in the designated component according to the name, the calling method is stored in a protocol, and the calling method is used for calling the file; wherein, the liquid crystal display device comprises a liquid crystal display device,
the system acquires the source code of each file when judging whether the file is called by a designated component; splitting the designated component using the source code; if a split failure instruction is received, determining that the file is called by a designated component, and creating a protocol corresponding to the called file.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor for calling and executing program instructions in the memory to implement the mapping relation generating method according to any one of claims 1 to 3.
10. An electronic device, comprising:
a memory for storing program instructions;
a processor for calling and executing program instructions in the memory to implement the method for calling a mapping relationship as claimed in claim 4.
11. A storage medium having a computer program stored therein, wherein the mapping generation apparatus executes the mapping generation method according to any one of claims 1 to 3 when the computer program is executed by at least one processor of the mapping generation apparatus.
12. A storage medium having a computer program stored therein, the map calling means executing the map calling method of claim 4 when the computer program is executed by at least one processor of the map calling means.
CN201910515189.0A 2019-06-14 2019-06-14 Mapping relation generation method, calling method and device Active CN110399161B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910515189.0A CN110399161B (en) 2019-06-14 2019-06-14 Mapping relation generation method, calling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910515189.0A CN110399161B (en) 2019-06-14 2019-06-14 Mapping relation generation method, calling method and device

Publications (2)

Publication Number Publication Date
CN110399161A CN110399161A (en) 2019-11-01
CN110399161B true CN110399161B (en) 2023-08-18

Family

ID=68323201

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910515189.0A Active CN110399161B (en) 2019-06-14 2019-06-14 Mapping relation generation method, calling method and device

Country Status (1)

Country Link
CN (1) CN110399161B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111240738B (en) * 2020-01-20 2023-11-21 北京有竹居网络技术有限公司 File processing method, device, equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004213220A (en) * 2002-12-27 2004-07-29 Internatl Business Mach Corp <Ibm> Program editing device, program editing method, and program
JP2005302015A (en) * 2004-04-08 2005-10-27 Shomei Seki Copyright protection method for digital publication, and system therefor
CN103399754A (en) * 2013-08-19 2013-11-20 银联商务有限公司 Software framework
US8943282B1 (en) * 2012-03-29 2015-01-27 Emc Corporation Managing snapshots in cache-based storage systems
CN106294683A (en) * 2016-08-05 2017-01-04 中国银行股份有限公司 A kind of file declustering method and device
WO2017032146A1 (en) * 2015-08-27 2017-03-02 中兴通讯股份有限公司 File sharing method and apparatus
CN109144521A (en) * 2018-09-28 2019-01-04 五八有限公司 Generate method, apparatus, computer equipment and the readable storage medium storing program for executing of static library
CN109815197A (en) * 2018-12-14 2019-05-28 平安普惠企业管理有限公司 Integrated file operation method, system, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9998434B2 (en) * 2015-01-26 2018-06-12 Listat Ltd. Secure dynamic communication network and protocol
US11627639B2 (en) * 2015-01-26 2023-04-11 Ievgen Verzun Methods and apparatus for HyperSecure last mile communication
US10133568B2 (en) * 2016-08-31 2018-11-20 International Business Machines Corporation Embedding code anchors in software documentation

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004213220A (en) * 2002-12-27 2004-07-29 Internatl Business Mach Corp <Ibm> Program editing device, program editing method, and program
JP2005302015A (en) * 2004-04-08 2005-10-27 Shomei Seki Copyright protection method for digital publication, and system therefor
US8943282B1 (en) * 2012-03-29 2015-01-27 Emc Corporation Managing snapshots in cache-based storage systems
CN103399754A (en) * 2013-08-19 2013-11-20 银联商务有限公司 Software framework
WO2017032146A1 (en) * 2015-08-27 2017-03-02 中兴通讯股份有限公司 File sharing method and apparatus
CN106294683A (en) * 2016-08-05 2017-01-04 中国银行股份有限公司 A kind of file declustering method and device
CN109144521A (en) * 2018-09-28 2019-01-04 五八有限公司 Generate method, apparatus, computer equipment and the readable storage medium storing program for executing of static library
CN109815197A (en) * 2018-12-14 2019-05-28 平安普惠企业管理有限公司 Integrated file operation method, system, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电子文件的基本性质与归档体系的建设;侯卫真;档案学通讯(第03期);全文 *

Also Published As

Publication number Publication date
CN110399161A (en) 2019-11-01

Similar Documents

Publication Publication Date Title
US7287190B2 (en) Simultaneous execution of test suites on different platforms
CN109376088B (en) Automatic test system and automatic test method
CN111930382B (en) Application page access method, device and equipment
CN114077462A (en) Method, device, equipment and medium for calling Android HIDL interface by software operating system
CN112416353A (en) Channel package packaging method and device and computer equipment
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN113407362A (en) SOMEIP communication intermediate layer implementation method and system based on SOA architecture of vehicle-mounted Android system
CN109039730B (en) Server cluster and server cluster configuration information management method
US20090037878A1 (en) Web Application Development Tool
CN112631649A (en) Intelligent contract management method, device, terminal equipment and medium
CN110399161B (en) Mapping relation generation method, calling method and device
CN109343970B (en) Application program-based operation method and device, electronic equipment and computer medium
CN111176641A (en) Flow node execution method, device, medium and electronic equipment
CN112579212A (en) Cross-language calling method, calling party device and called party device
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN111522536A (en) Method for calling programming language and related equipment thereof
US20190320473A1 (en) Methods and apparatuses for connecting a wireless access point through an application in a user equipment
CN114500302B (en) ICE service arrangement method, ICE service arrangement device, terminal equipment and storage medium
CN116560722B (en) Operation and maintenance flow processing method and device, electronic equipment and storage medium
CN113626007B (en) Application method and device of connector model and server
CN109725887B (en) Data interaction method and device based on message research and development framework and terminal equipment
CN110191141B (en) Service calling information processing method and device and computer system
CN114816889A (en) Serial port protocol testing method and device and processing equipment
CN113391889A (en) Service calling method, device, medium and electronic equipment
CN113986207A (en) Software architecture generating and calling method and device

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