CN111240664A - Data processing method and device, electronic equipment and storage medium - Google Patents

Data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111240664A
CN111240664A CN202010015566.7A CN202010015566A CN111240664A CN 111240664 A CN111240664 A CN 111240664A CN 202010015566 A CN202010015566 A CN 202010015566A CN 111240664 A CN111240664 A CN 111240664A
Authority
CN
China
Prior art keywords
file
packaged
code data
preset
electronic device
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
CN202010015566.7A
Other languages
Chinese (zh)
Inventor
李正雄
高玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202010015566.7A priority Critical patent/CN111240664A/en
Publication of CN111240664A publication Critical patent/CN111240664A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, a data processing device, electronic equipment and a storage medium, and belongs to the technical field of internet. The method comprises the steps of obtaining code data to be packaged, wherein the code data are used for realizing a preset function; packaging the code data to obtain a packaged file; and sending the packed file to a preset public file library so that the second electronic equipment calls the packed file according to the storage position of the packed file in the preset public file library, thereby solving the problem that errors are easy to occur in data copying in the manual code copying process.

Description

Data processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
In VUE (progressive framework for constructing user interface) project research and development, in order to reduce repeated work, a developer can search the disclosed codes capable of realizing a certain function when writing the codes for realizing the function, and directly copy the searched codes to the code file of the current research and development project.
However, in the process of implementing the present invention, the inventors found that in the process of copying the code, a situation of copying some files or functions may occur, so that the copied code cannot be used normally, and a developer needs to further correct and debug. Therefore, the current manual copying of codes has the problem that data copying is easy to generate errors.
Disclosure of Invention
An embodiment of the present application provides a data processing method, an apparatus, an electronic device, and a storage medium, so as to solve a problem that errors are easily generated in data copying in an artificial code copying process. The specific technical scheme is as follows:
in a first aspect, a data processing method is provided, where the method is applied to a first electronic device, and the method includes:
code data to be packaged are obtained, and the code data are used for realizing a preset function;
packaging the code data to obtain a packaged file;
and sending the packaged file to a preset public file library so that the second electronic equipment can call the packaged file according to the storage position of the packaged file in the preset public file library.
Optionally, the packaging the code data to obtain a packaged file includes:
acquiring configuration parameters of a file to be packaged containing the code data, wherein the configuration parameters comprise at least one of a storage position, a reference mode and a file name;
generating an entry file containing the configuration parameters;
and calling a packaging tool to package the file to be packaged according to the configuration parameters recorded in the entry file to obtain a packaged file.
Optionally, the method further includes:
receiving an updating instruction of the code data;
acquiring updated code data;
packaging the updated code data to obtain a packaged updated packaged file;
and sending the updated packaged file to a preset common file library so that the preset common file library updates the packaged file stored at the storage position into the updated packaged file.
Optionally, the method further includes:
and setting the change authority of the packaged file so that the second electronic equipment can change the packaged file according to the change authority.
In a second aspect, a data processing method is provided, where the method is applied to a second electronic device, and the method includes:
when a code acquisition instruction is received, determining the storage position of a packed file containing target code data in a preset common file library, wherein the target code data are code data which can realize a preset function and are acquired by the code acquisition instruction;
and calling the packaged file according to the storage position of the packaged file in a preset public file library, wherein the packaged file is obtained by a first electronic device by acquiring code data to be packaged and packaging the code data, and the code data is used for realizing a preset function.
Optionally, the method further includes:
if the change operation of the packed file is detected, obtaining the change authority of the packed file;
and if the change operation accords with the change permission, executing the change operation on the packaged file.
In a third aspect, a data processing apparatus is provided, where the apparatus is applied to a first electronic device, and the apparatus includes:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring code data to be packaged, and the code data is used for realizing a preset function;
the packaging module is used for packaging the code data to obtain a packaged file;
and the sending module is used for sending the packaged file to a preset public file library so that the second electronic equipment can call the packaged file according to the storage position of the packaged file in the preset public file library.
Optionally, the packing module includes:
the obtaining submodule is used for obtaining configuration parameters of the file to be packaged containing the code data, wherein the configuration parameters comprise at least one of a storage position, a reference mode and a file name;
the generation submodule is used for generating an entry file containing the configuration parameters;
and the packing submodule is used for calling a packing tool so as to pack the file to be packed according to the configuration parameters recorded in the entry file to obtain a packed file.
Optionally, the apparatus further comprises:
the receiving module is used for receiving an updating instruction of the code data;
the acquisition module is further used for acquiring the updated code data;
the packaging module is further used for packaging the updated code data to obtain a packaged updated packaged file;
the sending module is further configured to send the updated packaged file to a preset common file library, so that the preset common file library updates the packaged file stored at the storage location to the updated packaged file.
Optionally, the apparatus further comprises:
and the setting module is used for setting the change permission of the packaged file so as to enable the second electronic equipment to change the packaged file according to the change permission.
In a fourth aspect, a data processing apparatus is provided, where the apparatus is applied to a second electronic device, and the apparatus includes:
the system comprises a determining module, a storage module and a processing module, wherein the determining module is used for determining the storage position of a packed file containing target code data in a preset public file library when a code acquisition instruction is received, and the target code data is code data which can realize a preset function and is obtained by the code acquisition instruction;
and the calling module is used for calling the packaged file according to the storage position of the packaged file in a preset public file library, wherein the packaged file is obtained by a first electronic device by acquiring code data to be packaged and packaging the code data, and the code data is used for realizing a preset function.
Optionally, the apparatus further comprises:
the acquisition module is used for acquiring the change permission of the packaged file when the change operation of the packaged file is detected;
and the changing module is used for executing the changing operation on the packaged file when the changing operation accords with the changing right.
In a fifth aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the first aspect or any of the second aspect when executing a program stored in the memory.
In a sixth aspect, a computer-readable storage medium is provided, having stored thereon a computer program which, when being executed by a processor, carries out the method steps of any of the first aspects, or any of the second aspects.
In a seventh aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the data processing methods described above.
The embodiment of the application has the following beneficial effects:
the embodiment of the application provides a data processing method, a data processing device, an electronic device and a storage medium, wherein code data to be packaged for realizing a preset function is acquired; packaging the code data to obtain a packaged file; and sending the packaged file to a preset common file library so that the second electronic equipment calls the packaged file according to the storage position of the packaged file in the preset common file library. The code data capable of realizing the preset function is packaged, so that the second electronic device can obtain all codes capable of realizing the preset function only by calling the packaged file according to the storage position of the packaged file in the preset public file library, and the problem that errors are easy to occur in data copying in the process of manually copying the codes can be solved.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a flowchart of a first data processing method provided in an embodiment of the present application;
fig. 2 is a flowchart of a second data processing method provided in an embodiment of the present application;
fig. 3 is a flowchart of a third data processing method provided in the embodiment of the present application;
fig. 4 is a flowchart of a fourth data processing method provided in the embodiment of the present application;
fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a data processing method, which can be applied to first electronic equipment, wherein code data capable of realizing a preset function can be stored in the first electronic equipment. The preset function can be that an icon on a preset display page is clicked, and comments can be added; or the preset function can be clicking an icon on a preset display page, and sequencing and displaying the plurality of comments according to the generation time of the comments.
The first electronic device can upload code data capable of realizing the preset function to the network, so that other developers can call the code data based on the storage position of the code data in the network through the second electronic device in the process of developing the front-end project, and the preset function is realized.
In the embodiment of the application, the first electronic device and the second electronic device may be a notebook computer, a tablet computer, a mobile phone, and the like.
A detailed description will be given below, with reference to a specific embodiment, of a data processing method applied to a first electronic device provided in an embodiment of the present application, as shown in fig. 1, the specific steps are as follows:
step 101, code data to be packaged are obtained.
Wherein the code data is used to implement a preset function.
In implementation, the first electronic device may acquire code data that can implement a preset function, and use the acquired code data as code data to be packaged.
In one possible implementation manner, a plurality of lines of codes capable of realizing the preset function may be recorded in a target file locally stored in the first electronic device, and after receiving a reading instruction, the first electronic device may read the plurality of lines of codes from the target file to obtain the code data capable of realizing the preset function.
In another possible implementation manner, the first electronic device may receive multiple lines of code input by a developer, and use the received multiple lines of code as code data capable of implementing a preset function.
In the embodiment of the present application, the code data may be a multi-line code or a data file containing a code.
And 102, packaging the code data to obtain a packaged file.
In implementation, the first electronic device may compile and compress the code data to be packaged into the same data file or multiple data files, and use the data files as packaged files.
Or, a packaging tool may be preset in the first electronic device, and the first electronic device may perform packaging processing on the code data through the packaging tool to obtain a packaged file, where a detailed description will be given later on a specific processing procedure.
And 103, sending the packaged file to a preset public file library.
The preset public file library can be stored in a network, and the packaged files sent by the electronic devices can be stored in the preset public file library. For convenience of description, a preset function that can be realized by code data included in a certain package file is referred to as a preset function corresponding to the package file. The preset common file library can correspondingly store the storage position of each packaged file and the function identifier of the preset function corresponding to the packaged file. Any electronic device can obtain the storage position of the packaged file in the preset public file library by accessing the preset public file library.
In implementation, the first electronic device may send the package file to a preset common file library, and the preset common file library may record a local storage location of the package file, so that the second electronic device calls the package file according to the storage location of the package file in the preset common file library. The specific processing procedure of the second electronic device will be described in detail later.
Optionally, the second electronic device may also download the package file from a preset common file library, store and record a storage location of the package file locally, and call the package file according to the storage location. In a state where the first electronic device and the second electronic device maintain communication connection, the first electronic device may send the package file to the second electronic device after receiving the package file acquisition request sent by the second electronic device.
In the embodiment of the application, the first electronic device can acquire code data to be packaged for realizing a preset function; packaging the code data to obtain a packaged file; and sending the packaged file to a preset common file library so that the second electronic equipment calls the packaged file according to the storage position of the packaged file in the preset common file library. The code data capable of realizing the preset function is packaged, so that the second electronic device can obtain all codes capable of realizing the preset function only by calling the packaged file according to the storage position of the packaged file in the preset public file library, and the problem that errors are easy to occur in data copying due to manual code copying can be solved.
Optionally, a packing tool, such as webpack module packer and gront, may be preset in the first electronic device, and the first electronic device may pack the code data through the packing tool. As shown in fig. 2, a specific process of the first electronic device performing packaging processing on the code data through the packaging tool includes:
step 201, obtaining configuration parameters of a file to be packaged containing code data.
The configuration parameters comprise at least one of file names, reference modes and storage positions of the files to be packaged.
In implementation, since the writing language of the code data may be a writing language that cannot be recognized by the browser, the first electronic device may rewrite the code data based on the preset writing language, and generate a file to be packaged that includes the code data written based on the preset writing language. Then, the first electronic device may locally store the file to be packaged, record configuration parameters such as a storage location of the file to be packaged in the local storage, a file name of the file to be packaged, a reference mode, and the like, and obtain a corresponding relationship between the file to be packaged and the configuration parameters.
Therefore, the electronic equipment can determine the configuration parameters of the files to be packaged according to the corresponding relationship between the pre-stored files to be packaged and the configuration parameters aiming at each file to be packaged.
In a possible implementation manner, the electronic device may also receive configuration parameters of the file to be packaged, which are input by a developer.
Step 202, generating an entry file containing the configuration parameters.
In implementation, the first electronic device may record the configuration parameters of each file to be packaged in a preset file to obtain an entry file.
Step 203, calling a packaging tool to package the file to be packaged according to the configuration parameters recorded in the entry file, so as to obtain a packaged file.
In implementation, the first electronic device may call a packaging tool, obtain a to-be-packaged file from each storage location recorded in the entry file according to a file name, package the to-be-packaged file according to a corresponding reference manner, obtain a packaged file, and store the packaged file.
The first electronic device calls a packaging tool to package the file to be packaged according to the configuration parameters recorded in the entry file, which is the prior art and is not described herein again.
In the embodiment of the present application, the file format of the package file conforms to a predetermined file format specification, such as AMD (Asynchronous Module Definition), CMD (Common Module Definition), and UMD (Universal Module Definition) specifications.
In the embodiment of the application, the first electronic device may obtain the configuration parameters of the file to be packaged containing the code data, and generate the entry file containing the configuration parameters. And calling a packaging tool to package the file to be packaged according to the configuration parameters recorded in the entry file to obtain the packaged file. The code data are packaged through the packaging tool, on one hand, the second electronic equipment can obtain all codes capable of realizing the preset function only by calling the packaging file according to the storage position of the packaging file in the preset public file library, and therefore the problem that errors are prone to occur in data copying due to manual code copying can be solved; on the other hand, code data written based on the writing language which cannot be identified by the browser can be changed into code data written based on the writing language which can be identified by the browser, so that the browser can be ensured to run the packaged file, and the function corresponding to the packaged file is realized.
Optionally, after sending the packaged file to the preset common file library, that is, after the packaged file is released to be on line, if the developer updates the code data before packaging, the first electronic device may further update the packaged file in the preset common file library, as shown in fig. 3, the specific processing procedure includes:
step 301, receiving an update instruction of code data.
In implementation, the developer may perform a preset updating operation so that the first electronic device receives an updating instruction of the code data. The preset updating operation may be clicking an updating icon in the preset page, or inputting a code representing updating code data.
Step 302, obtaining the updated code data.
In implementation, a specific processing procedure for acquiring the updated code data by the first electronic device is similar to the specific processing procedure for acquiring the code data by the first electronic device, and is not described herein again.
And 303, packaging the updated code data to obtain a packaged updated packaged file.
In implementation, a specific processing procedure of the first electronic device for packaging the updated code data is similar to the specific processing procedure of the first electronic device for packaging the code data, and is not described herein again.
And step 304, sending the updated packaged file to a preset public file library.
The packaged file stored in the preset common file library and having the same function as the updated packaged file can be called as an original packaged file. In order to facilitate management of the plurality of packaged files and the storage location of each packaged file, the preset common file library may store the storage location of each packaged file and the function identifier of the preset function corresponding to the packaged file, so as to obtain a corresponding relationship between the storage location and the function identifier.
In an implementation, the first electronic device may send the update package file to a preset common file repository.
After the updated packaged file is obtained by the preset common file library, the preset common file library may determine the storage location of the original packaged file according to the function identifier of the preset function corresponding to the updated packaged file, and the corresponding relationship between the storage location and the function identifier. Then, the preset common file repository may update the original packaged file stored at the storage location to an updated packaged file. Therefore, the second electronic equipment can call the changed updated packaged file based on the storage position of the original packaged file without executing any operation.
In the embodiment of the application, the first electronic device may receive an update instruction of the code data, acquire the updated code data, and then, the first electronic device may package the updated code data to obtain a packaged updated packaged file. Then, the first electronic device may send the updated packaged file to a preset common file library so that the preset common file library updates the packaged file stored at the storage location to the updated packaged file, and the second electronic device calls the updated packaged file based on the same storage location.
By adopting the technical scheme provided by the embodiment of the application, the packaged file in the preset public file library can be updated, so that developers of code data, namely developers of the packaged file, can update and maintain the packaged file, and adjustment of project functions and online management of projects are realized.
On the other hand, in the related art, when updating code data, a developer needs to replace code data for implementing a preset function with updated code data in a code writing page of a current development project. In the embodiment of the present application, the preset common file repository may update the original packed file stored at the storage location of the original packed file into the updated packed file after receiving the updated packed file.
Compared with the related art, the second electronic equipment does not need to replace code data in the code writing page, and can call the update package file according to the same storage position. By adopting the technical scheme provided by the embodiment of the application, the method and the device have the advantages of being simple in operation, the situation that errors are easy to occur in data copying when the codes are copied manually can be avoided, and the synchronism of the code data updated by each second electronic device is ensured.
Optionally, in order to ensure the security of the code data, the first electronic device may further set a modification right of the packaged file, where the modification right is, for example, a read permission, a write permission, a read permission prohibition, a write permission, and the like. Therefore, after the packaged file is downloaded from the preset public file library, the second electronic device can change the packaged file according to the change authority, and the detailed description of the specific processing process will be described later.
In the embodiment of the application, the first electronic device can set the change authority of the packaged file, so that code data can be prevented from being tampered by a citation party, and the safety of the code data is guaranteed.
An embodiment of the present application further provides a data processing method applied to a second electronic device, as shown in fig. 4, including the following steps:
step 401, when a code acquisition instruction is received, determining a storage location of a packaged file containing target code data in a preset common file library.
The target code data is code data which can realize a preset function and is indicated to be acquired by the code acquisition instruction.
In implementation, if the developer wants to add code data capable of implementing a preset function, the developer may perform a code obtaining operation to cause the second electronic device to receive a code obtaining instruction. The code obtaining operation may be inputting a target function identifier of a preset function in a preset command bar, or clicking an icon of the preset function.
When receiving the code acquisition instruction, the second electronic device may determine a target function identifier indicating a preset function that the acquired code data can implement. Then, the second electronic device may generate a data acquisition request including the target function identifier, and then, the second electronic device may transmit the data acquisition request to the preset common repository.
The preset common file library can determine the storage position of the packed file containing the target code data in the preset common file library according to the target function identification carried by the data acquisition request, the corresponding relation between the pre-stored function and the storage position after receiving the data acquisition request. Then, the predetermined common repository may send the determined storage location to the second electronic device.
Step 402, calling the packaged file according to the storage position of the packaged file in a preset public file library.
The packaging file is obtained by the first electronic device through obtaining code data to be packaged and packaging the code data, and the code data is used for achieving a preset function. For a specific processing procedure of generating the packaged file by the first electronic device, reference may be made to the above method steps of the data processing method applied to the first electronic device, and details are not described here.
In implementation, the second electronic device may record a storage location in a code writing page of the front-end project, so that when the front-end project is run by a subsequent browser, the packaged file is called based on the storage location, and a preset function corresponding to the packaged file is realized.
In this embodiment of the application, the second electronic device may determine, when receiving the code obtaining instruction, a storage location of the packed file including the target code data in the preset common file library, and call the packed file according to the storage location of the packed file in the preset common file library. The second electronic equipment can obtain all codes capable of realizing the preset function only by calling the packaged file according to the storage position of the packaged file in the preset public file library, so that the problem that errors are easy to occur in data copying due to manual code copying can be solved.
Optionally, the packaged file may further be preset with a change permission, and the second electronic device may determine whether to execute a change operation on the packaged file according to the change permission of the packaged file, where the specific processing procedure includes:
step 1, if the change operation of the packed file is detected, the change authority of the packed file is obtained.
Wherein the change operation is for example writing data, copying data.
In implementation, if a developer wants to change code data in a certain package file, the developer may perform a change operation, and then the second electronic device may detect the change operation for the package file, and then the second electronic device may obtain a change right of the package file.
The embodiment of the application provides two implementation modes for acquiring the change permission of the packaged file by the second electronic equipment: in the first mode, the change permission of the packaged file can be recorded in each packaged file, and the second electronic device can acquire the change permission of the packaged file by analyzing the packaged file.
And in the second mode, the change authority of each packaged file can be recorded in the preset common file library, and the second electronic device can acquire the change authority of a certain packaged file in a mode of accessing the preset common file library.
And 2, judging whether the change operation accords with the change authority.
In implementation, the second electronic device may determine whether the change operation conforms to the change authority, and if the change operation conforms to the change authority, the second electronic device may perform step 3; if the change operation does not comply with the change authority, the second electronic device may perform step 4.
And 3, executing change operation on the packed file.
And 4, prompting preset prompting information.
In implementation, the second electronic device may store a prompt message in advance, and the second electronic device may display the prompt message in a preset display interface after determining that the modification operation does not meet the modification permission. Prompt information such as "you do not have write permission" and "this file is write prohibited".
In this embodiment of the application, the second electronic device may obtain the modification permission of the packaged file when detecting a modification operation on the packaged file. Then, the second electronic device can judge whether the change operation accords with the change authority of the packed file, if the change operation accords with the change authority, the change operation is executed, and if the change operation does not accord with the change authority, preset prompt information is prompted. The second electronic device can process the detected change operation according to the change authority of the packaged file, so that the code data can be prevented from being tampered, and the safety of the code data is ensured.
Based on the same technical concept, an embodiment of the present application further provides a data processing apparatus, which is applied to a first electronic device, and as shown in fig. 5, the apparatus includes:
an obtaining module 510, configured to obtain code data to be packaged, where the code data is used to implement a preset function;
a packing module 520, configured to perform packing processing on the code data to obtain a packed file;
a sending module 530, configured to send the package file to a preset common file library, so that the second electronic device calls the package file according to a storage location of the package file in the preset common file library.
Optionally, the packing module includes:
the obtaining submodule is used for obtaining configuration parameters of the file to be packaged containing the code data, wherein the configuration parameters comprise at least one of a storage position, a reference mode and a file name;
the generation submodule is used for generating an entry file containing the configuration parameters;
and the packing submodule is used for calling a packing tool so as to pack the file to be packed according to the configuration parameters recorded in the entry file to obtain a packed file.
Optionally, the apparatus further comprises:
the receiving module is used for receiving an updating instruction of the code data;
the acquisition module is further used for acquiring the updated code data;
the packaging module is further used for packaging the updated code data to obtain a packaged updated packaged file;
the sending module is further configured to send the updated packaged file to a preset common file library, so that the preset common file library updates the packaged file stored at the storage location to the updated packaged file.
Optionally, the apparatus further comprises:
and the setting module is used for setting the change permission of the packaged file so as to enable the second electronic equipment to change the packaged file according to the change permission.
The embodiment of the application provides a data processing device, which can acquire code data to be packaged for realizing a preset function; packaging the code data to obtain a packaged file; and sending the packaged file to a preset common file library so that the second electronic equipment calls the packaged file according to the storage position of the packaged file in the preset common file library. The code data capable of realizing the preset function is packaged, so that the second electronic device can obtain all codes capable of realizing the preset function only by calling the packaged file according to the storage position of the packaged file in the preset public file library, and the problem that errors are easy to occur in data copying in the process of manually copying the codes can be solved.
Based on the same technical concept, an embodiment of the present application further provides a data processing apparatus, which is applied to a second electronic device, as shown in fig. 6, and includes:
a determining module 610, configured to determine, when a code obtaining instruction is received, a storage location of a packed file in a preset common file library, where the packed file includes object code data, where the object code data is code data that can be obtained by the code obtaining instruction and that can implement a preset function;
the calling module 620 is configured to call the packaged file according to a storage location of the packaged file in a preset public file library, where the packaged file is obtained by a first electronic device by obtaining code data to be packaged, and packaging the code data, where the code data is used to implement a preset function.
Optionally, the apparatus further comprises:
the acquisition module is used for acquiring the change permission of the packaged file when the change operation of the packaged file is detected;
and the changing module is used for executing the changing operation on the packaged file when the changing operation accords with the changing right.
The embodiment of the application provides a data processing device, which can determine the storage position of a packed file containing target code data in a preset public file library when a code acquisition instruction is received, and call the packed file according to the storage position of the packed file in the preset public file library. The second electronic equipment can obtain all codes capable of realizing the preset function only by calling the packaged file according to the storage position of the packaged file in the preset public file library, so that the problem that errors are easy to occur in data copying due to manual code copying can be solved.
Based on the same technical concept, the embodiment of the present application further provides an electronic device, as shown in fig. 7, including a processor 701, a communication interface 702, a memory 703 and a communication bus 704, where the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704,
a memory 703 for storing a computer program;
the processor 701 is configured to implement the data processing method steps executed by the first electronic device or the data processing method steps executed by the second electronic device when executing the program stored in the memory 703.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In yet another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the data processing methods described above.
In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform any of the data processing methods of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data processing method is applied to a first electronic device, and comprises the following steps:
code data to be packaged are obtained, and the code data are used for realizing a preset function;
packaging the code data to obtain a packaged file;
and sending the packaged file to a preset public file library so that the second electronic equipment can call the packaged file according to the storage position of the packaged file in the preset public file library.
2. The method of claim 1, wherein the packaging the code data to obtain a packaged file comprises:
acquiring configuration parameters of a file to be packaged containing the code data, wherein the configuration parameters comprise at least one of a storage position, a reference mode and a file name;
generating an entry file containing the configuration parameters;
and calling a packaging tool to package the file to be packaged according to the configuration parameters recorded in the entry file to obtain a packaged file.
3. The method of claim 1, further comprising:
receiving an updating instruction of the code data;
acquiring updated code data;
packaging the updated code data to obtain a packaged updated packaged file;
and sending the updated packaged file to a preset common file library so that the preset common file library updates the packaged file stored at the storage position into the updated packaged file.
4. The method of claim 1, further comprising:
and setting the change authority of the packaged file so that the second electronic equipment can change the packaged file according to the change authority.
5. A data processing method is applied to a second electronic device, and comprises the following steps:
when a code acquisition instruction is received, determining the storage position of a packed file containing target code data in a preset common file library, wherein the target code data are code data which can realize a preset function and are acquired by the code acquisition instruction;
and calling the packaged file according to the storage position of the packaged file in a preset public file library, wherein the packaged file is obtained by a first electronic device by acquiring code data to be packaged and packaging the code data, and the code data is used for realizing a preset function.
6. The method of claim 5, further comprising:
if the change operation of the packed file is detected, obtaining the change authority of the packed file;
and if the change operation accords with the change permission, executing the change operation on the packaged file.
7. A data processing apparatus, the apparatus being applied to a first electronic device, the apparatus comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring code data to be packaged, and the code data is used for realizing a preset function;
the packaging module is used for packaging the code data to obtain a packaged file;
and the sending module is used for sending the packaged file to a preset public file library so that the second electronic equipment can call the packaged file according to the storage position of the packaged file in the preset public file library.
8. A data processing apparatus, wherein the apparatus is applied to a second electronic device, the apparatus comprising:
the system comprises a determining module, a storage module and a processing module, wherein the determining module is used for determining the storage position of a packed file containing target code data in a preset public file library when a code acquisition instruction is received, and the target code data is code data which can realize a preset function and is obtained by the code acquisition instruction;
and the calling module is used for calling the packaged file according to the storage position of the packaged file in a preset public file library, wherein the packaged file is obtained by a first electronic device by acquiring code data to be packaged and packaging the code data, and the code data is used for realizing a preset function.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 4, or claims 5 to 6, when executing a program stored in a memory.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of claims 1 to 4 or, respectively, of claims 5 to 6.
CN202010015566.7A 2020-01-07 2020-01-07 Data processing method and device, electronic equipment and storage medium Pending CN111240664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010015566.7A CN111240664A (en) 2020-01-07 2020-01-07 Data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010015566.7A CN111240664A (en) 2020-01-07 2020-01-07 Data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111240664A true CN111240664A (en) 2020-06-05

Family

ID=70870324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010015566.7A Pending CN111240664A (en) 2020-01-07 2020-01-07 Data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111240664A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080028388A1 (en) * 2006-07-26 2008-01-31 Michael Burtscher System and method for analyzing packed files
CN107589949A (en) * 2016-07-07 2018-01-16 北京京东尚科信息技术有限公司 The distribution of application program installation kit and installation method and corresponding intrument
CN108363912A (en) * 2018-02-28 2018-08-03 苏州国芯科技有限公司 A kind of close guarantor's method and device of program code
CN108664267A (en) * 2018-04-09 2018-10-16 上海瀚银信息技术有限公司 A kind of code automatic packaging system
CN109683950A (en) * 2018-12-17 2019-04-26 Oppo广东移动通信有限公司 Application program packaging method, device, storage medium and terminal
CN109783129A (en) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 Applied program processing method, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080028388A1 (en) * 2006-07-26 2008-01-31 Michael Burtscher System and method for analyzing packed files
CN107589949A (en) * 2016-07-07 2018-01-16 北京京东尚科信息技术有限公司 The distribution of application program installation kit and installation method and corresponding intrument
CN108363912A (en) * 2018-02-28 2018-08-03 苏州国芯科技有限公司 A kind of close guarantor's method and device of program code
CN108664267A (en) * 2018-04-09 2018-10-16 上海瀚银信息技术有限公司 A kind of code automatic packaging system
CN109783129A (en) * 2018-12-15 2019-05-21 深圳壹账通智能科技有限公司 Applied program processing method, device, computer equipment and storage medium
CN109683950A (en) * 2018-12-17 2019-04-26 Oppo广东移动通信有限公司 Application program packaging method, device, storage medium and terminal

Similar Documents

Publication Publication Date Title
CN108196878B (en) Method and device for generating application program installation package, electronic equipment and storage medium
WO2015131804A1 (en) Call stack relationship acquiring method and apparatus
CN107729452B (en) Webpage loading method and device, electronic equipment and computer readable storage medium
CN115292197A (en) Software testing method and device, electronic equipment and storage medium
CN109032612B (en) Interface calling method and device of hybrid application and computer readable storage medium
CN114461223A (en) Code generation method and device and terminal equipment
CN113094048A (en) Data display rule determining method, display method, device, equipment and medium
CN111399849A (en) Method and system for determining application program installation package
CN111506312A (en) Page generation method and device, computer equipment and storage medium
CN109710128B (en) Shortcut key display method and device
CN111124545A (en) Application program starting method and device, electronic equipment and storage medium
CN111240664A (en) Data processing method and device, electronic equipment and storage medium
CN112925561B (en) Software development method, device, computer equipment and storage medium
CN111475148A (en) Third-party dependent library isolation method and device, electronic equipment and storage medium
CN112527371B (en) Boot loader upgrading method and device, electronic equipment and storage medium
US20210149667A1 (en) Automated dependency detection and response
CN114416641A (en) File data processing method and device, electronic equipment and storage medium
CN111444451B (en) Document acquisition method and device, electronic equipment and readable storage medium
CN109828781B (en) Source code version positioning method, device, medium and equipment for problem troubleshooting
CN113867778A (en) Method and device for generating mirror image file, electronic equipment and storage medium
CN113050950A (en) Application program development method and device, electronic equipment and machine-readable storage medium
CN110888643A (en) Page processing method and device
CN112162923A (en) Interface testing method and device
CN116361748B (en) Software supply chain safety detection method and device
CN113094710B (en) Application program detection 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
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co.,Ltd.

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

CB02 Change of applicant information