CN108563728B - Method and device for uploading medical image file through browser - Google Patents

Method and device for uploading medical image file through browser Download PDF

Info

Publication number
CN108563728B
CN108563728B CN201810299610.4A CN201810299610A CN108563728B CN 108563728 B CN108563728 B CN 108563728B CN 201810299610 A CN201810299610 A CN 201810299610A CN 108563728 B CN108563728 B CN 108563728B
Authority
CN
China
Prior art keywords
medical image
image file
folder
browser
uploading
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
CN201810299610.4A
Other languages
Chinese (zh)
Other versions
CN108563728A (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.)
Neusoft Medical Systems Co Ltd
Original Assignee
Neusoft Medical Systems 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 Neusoft Medical Systems Co Ltd filed Critical Neusoft Medical Systems Co Ltd
Priority to CN201810299610.4A priority Critical patent/CN108563728B/en
Publication of CN108563728A publication Critical patent/CN108563728A/en
Application granted granted Critical
Publication of CN108563728B publication Critical patent/CN108563728B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The method comprises the steps of receiving a medical image file uploading request triggered by a user through a browser, acquiring a calling function corresponding to a preset function module integrated on the browser, calling the preset function module integrated on the browser according to the calling function, and analyzing the module into an example object for uploading the medical image file in a folder form; finally, acquiring a folder path where the medical image file is located according to the example object, and acquiring the folder where the medical image file is located according to the medical image file path; and uploading the folder where the medical image file is located to a background server. The method can realize that the user uploads the medical image files integrally in a folder form through the browser.

Description

Method and device for uploading medical image file through browser
Technical Field
The application relates to the technical field of medical images, in particular to a method and a device for uploading medical image files through a browser.
Background
Medical imaging is a discipline based on radiodiagnostic medicine that encompasses a variety of imaging techniques, such as conventional radiography, digital radiography (CR, DR), Digital Subtraction Angiography (DSA), Computed Tomography (CT), Magnetic Resonance Imaging (MRI), ultrasound (B-mode, etc.), radionuclide scanning (SPECT, PET, etc.), and the like.
With the development of digital medical imaging technology and the fifth generation hypertext markup language (HTML5) technology, imaging doctors frequently use browsers to browse medical images, and the functions required by imaging doctors are more complex, such as uploading medical image files.
Currently, in order to share medical image files, a user such as an imaging doctor needs to upload the medical image files from a local place to a background server. When uploading a medical image file through the HTML5 page of the conventional medical image browser, a user cannot upload the file in a folder form, and only can select the content in the folder to operate in a single-selection or full-selection manner. However, the number of medical image files of a patient is very large, and if the medical image files are uploaded one by one, the uploading of the medical image files takes too much time, and the film reading experience of a user is reduced.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for uploading medical image files through a browser, so as to support a user to upload the medical image files through the browser in a folder manner, thereby saving file uploading time and improving user experience of reading films.
In order to achieve the purpose of the invention, the following technical scheme is adopted in the application:
a method for uploading medical image files through a browser comprises the following steps:
receiving a medical image file uploading request triggered by a user through a browser, wherein the medical image file uploading request carries a folder path where a medical image file is located;
acquiring a calling function corresponding to a preset function module integrated on the browser according to the uploading request of the medical image file; the preset function module is used for converting a text format of a source code of the medical image file uploaded in a folder form into a text format which can be supported by a browser and is close to a binary format of a machine language;
calling a preset function module integrated on the browser according to the calling function so as to analyze the preset function module into an example object for uploading a medical image file in a folder form;
acquiring a folder path where the medical image file is located according to the example object, and acquiring a folder where the medical image file is located according to the medical image file path; and uploading the folder where the medical image file is located to a background server.
Optionally, the method further comprises: the preset function module is generated, and the preset function module is generated,
the generating the preset function module specifically includes:
acquiring a source code for uploading a medical image file in a folder form;
converting the source code into LLVM bytecode;
processing the LLVM bytecode into a subset of javascript language with a text format being a first preset format; the first preset format is a text format which can be identified by a browser;
processing the subset of the javascript language into a file with a text format being a second preset format; the second preset format is a binary format close to a machine language.
Optionally, the source code is written using C language.
Optionally, the parsing the preset function module into an instance object for uploading the medical image file in a folder form specifically includes:
acquiring a storage path of the preset function module on the browser;
acquiring a file with a text format in a second preset format according to the storage path;
converting the file in the second preset format into memory data;
and compiling and initializing the memory data into an example object for uploading the medical image file through a browser engine.
Optionally, the folder path where the medical image file is located is obtained according to the example object, and the folder where the medical image file is located is obtained according to the medical image file path; uploading a folder where the medical image file is located to a background server, which specifically comprises:
reading a folder path where the medical image file carried in the medical image file uploading request is located;
traversing the medical image files in the folder where the medical image files are located, and caching the traversed medical image files into a local memory buffer area;
and sending the medical image file cached in the local memory buffer area to a background server so that the background server writes the received medical image file into a newly created folder.
An apparatus for uploading medical image files through a browser, the apparatus comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a medical image file uploading request triggered by a user through a browser, and the medical image file uploading request carries a folder path where a medical image file is located;
the first acquisition unit is used for acquiring a calling function corresponding to a preset function module integrated on the browser according to the uploading request of the medical image file; the preset function module is used for converting a text format of a source code of the medical image file uploaded in a folder form into a text format which can be supported by a browser and is close to a binary format of a machine language;
the calling unit is used for calling a preset function module integrated on the browser according to the calling function so as to analyze the preset function module into an example object for uploading a medical image file in a folder form;
the second acquisition unit is used for acquiring a folder path where the medical image file is located according to the example object and acquiring the folder where the medical image file is located according to the medical image file path;
and the uploading unit is used for uploading the folder where the medical image file is located to the background server.
Optionally, the apparatus further comprises: a module generating unit for generating the preset function module,
the module generating unit specifically includes:
the system comprises a first acquisition subunit, a second acquisition subunit and a third acquisition subunit, wherein the first acquisition subunit is used for acquiring a source code for uploading a medical image file in a folder form;
a first conversion subunit, configured to convert the source code into LLVM bytecode;
the first processing subunit is used for processing the LLVM bytecode into a subset of javascript language with a text format being a first preset format; the first preset format is a text format which can be identified by a browser;
the second processing subunit is used for processing the subset of the javascript language into a file with a text format being a second preset format; the second preset format is a binary format close to a machine language.
Optionally, the source code is written using C language.
Optionally, the invoking unit specifically includes:
the second acquiring subunit is used for acquiring a storage path of the preset functional module on the browser;
the third acquiring subunit is used for acquiring a file with a text format in a second preset format according to the storage path;
the second conversion subunit is configured to convert the file in the second preset format into memory data;
and the example object generation subunit is used for compiling and initializing the memory data into the example object for uploading the medical image file through the browser engine.
Optionally, the second obtaining unit specifically includes:
the reading subunit is used for reading the folder path where the medical image file carried in the medical image file uploading request is located;
the traversal subunit is used for traversing the medical image file in the folder where the medical image file is located and caching the traversed medical image file into a local memory buffer area;
the uploading unit specifically comprises: and sending the medical image file cached in the local memory buffer area to a background server so that the background server writes the received medical image file into a newly created folder.
Compared with the prior art, the method has the following beneficial effects:
based on the above technical solution, a preset function module is integrated on the browser, and the preset function module can convert a text format of a source code for uploading a medical image file in a folder form into a text format of a binary format that can be supported by the browser and is close to a machine language. Therefore, the analysis speed and the transmission speed of the module are high, so that the browser engine does not consume much time when analyzing the module, and the user can integrally upload the medical image file in a folder form through the browser.
Drawings
In order that the manner in which the embodiments of the present application are attained and can be understood in detail, a brief description of the drawings will now be provided. It is to be understood that these drawings are merely illustrative of some of the embodiments of the application.
FIG. 1 is a schematic diagram of an interface for uploading a file by selecting a file in a folder;
fig. 2 is a schematic flow chart of a method for generating a preset function module according to an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a method for uploading a medical image file through a browser according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a control device for uploading medical image files through a browser according to an embodiment of the present application;
fig. 5 is a schematic structural diagram illustrating an apparatus for uploading medical image files through a browser according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a module generating unit in the apparatus for uploading medical image files through a browser according to the embodiment of the present application;
fig. 7 is a schematic structural diagram of an analysis unit in an apparatus for uploading a medical image file through a browser according to an embodiment of the present application.
Detailed Description
In the art, the function of supporting file transmission in the form of folders generally needs to be processed in C language or C + + language, or processed using flash. However, the current browser only supports the javascript language, and does not support other languages, and the flash technology has been gradually eliminated by the browser manufacturers. Therefore, browsers that support only the javascript language do not support transferring files in the form of folders.
Therefore, through the current browser, a user can only select one or more files in the folder through single selection or multiple selection to upload the local files to the background server. FIG. 1 is a schematic diagram of an interface for uploading a local file by selecting a file in a folder. For the medical imaging field, a plurality of medical imaging files of a patient are usually provided, and if the medical imaging files are uploaded one by one, the uploading of the medical imaging files takes too much time, and the film reading experience of a user is reduced.
In addition, although a scheme capable of uploading files in a folder form is provided at present, for example, nodjs is adopted, the scheme needs a background language and is also written by Javascript, and the scheme is realized by calling a Modules module of the nodjs special for controlling a local file system, the module is somewhat like a class library in C + + language, but the technical scheme of using nodjs is suitable for running data-intensive real-time application on distributed equipment and is not suitable for being used in a scene where a medical browser browses medical image files.
It should be noted that, in the embodiment of the present application, the medical image file may be a Digital Imaging and Communications in Medicine (abbreviated as DICOM in english) file.
In order to enable a browser to support a user to upload medical image files through the browser in a folder mode, so that file uploading time is saved, and user film reading experience is improved, the embodiment of the application provides a method for uploading the medical image files through the browser. The method for uploading the medical image file through the browser provided by the embodiment of the application mainly comprises the following steps: receiving a medical image file uploading request triggered by a user through a browser, acquiring a calling function corresponding to a preset function module integrated on the browser, and calling the preset function module integrated on the browser according to the calling function so as to analyze the module into an example object for uploading the medical image file in a folder form; finally, acquiring a folder path where the medical image file is located according to the example object, and acquiring the folder where the medical image file is located according to the medical image file path; and uploading the folder where the medical image file is located to a background server.
In the method, a preset function module is integrated on a browser, and the module can convert a text format of a source code for uploading the medical image file in a folder form into a text format which can be supported by the browser and is close to a binary format of a machine language. Therefore, the analysis speed and the transmission speed of the module are high, so that the browser engine does not consume much time when analyzing the module, and the user can integrally upload the medical image file in a folder form through the browser.
The following describes in detail a specific embodiment of a method for uploading a medical image file through a browser according to the present application with reference to the accompanying drawings.
First, a specific implementation of the method for generating the preset function module is introduced.
It should be noted that, because WebAssembly is another programming language that can be run in a web page besides JavaScript. WebAssembly does not rely on a concrete physical machine, which can be understood abstractly as it is the machine language of a conceptual machine, not the actual physical machine. Because of this, the WebAssembly instruction is sometimes also referred to as a virtual instruction. It maps more directly to machine code than JavaScript code, and it also represents an idea of how code can be executed more efficiently on general-purpose hardware. It does not map directly to the machine code of the specific hardware.
Therefore, in order to facilitate the browser to parse the preset function module more quickly, in the embodiment of the present application, the preset function module may be a WebAssembly module.
The specific implementation manner of generating the preset function module is described below by taking the preset function module and the WebAssembly module as an example.
Referring to fig. 2, a method for generating a preset function module according to an embodiment of the present application includes the following steps:
s201: and acquiring source codes for uploading the medical image files in the form of folders.
It is readily understood that the source code for implementing uploading of medical image files in folder form is written by a programmer.
As an example, in order to make local medical image files easy and efficient to obtain, the source codes of the medical image files can be written in C language, which is closer to the instruction codes executed by the CPU.
S202: converting the source code into LLVM bytecode.
It should be noted that if compiling from C language to WebAssembly is desired, the source code needs to be converted into intermediate code with a special format that can understand C language code. Currently, the best compiler toolchain to support WebAssembly is LLVM. LLVM is a technique for optimizing the compilation time of a program language, which can process the compilation and generation of codes faster, and therefore, in the embodiment of the present application, the intermediate code in the special format is LLVM bytecode. LLVM bytecode is a cross-language underlying virtual machine bytecode, which is characterized by a fast parsing speed. The process of converting the source code processing into LLVM bytecode can be implemented by an LLVM-based compilation tool.
Based on this, in order to realize fast parsing of the source code, this step converts the source code into LLVM bytecode whose meaning can be understood.
S203: and processing the LLVM bytecode into a subset of Javascript language with a text format of a first preset format.
It should be noted that, in the embodiment of the present application, the first preset format is a text format that can be recognized by a browser. Since the browser only supports the Javascript language, in order to be able to use the WebAssembly module in the browser, it is necessary to finally process the source code implementing the function of the WebAssembly module into an assembly language that can be recognized by the browser.
As an example, the LLVM bytecode obtained by converting in step S202 above may be processed into a subset of Javascript language by a compiler emscript. Since the browser supports the Javascript language, naturally, the browser also supports a subset of the Javascript language.
As an example, the text format of the subset of Javascript language may be asm.
S204: and processing the subset of the Javascript language into a file with a text format of a second preset format.
It should be noted that, in order to upload the medical image file in the form of a folder through the browser, the source code for uploading the medical image file in the form of a folder through the browser needs to be finally processed into a code with a high parsing speed and transmission speed. In the browser, the data stream transmitted by the file is generally a binary data stream, so the code with higher parsing speed and transmission speed can be in a binary format close to machine code.
Based on this, this step can process the subset of the Javascript language into a file in the format of. wasm format using the WABT tool. The wasm format is a cross-platform binary format close to machine language, and a browser engine can quickly and directly convert the wasm format file into a machine instruction in the process of uploading the medical image file in a folder form through a browser.
It should be noted that the file with the text format of wasm obtained in S204 is the WebAssembly module. Therefore, the preset function module generated through the steps can convert the text format of the source code of the medical image file uploaded in the form of a folder into the text format of the binary format which can be supported by the browser and is close to the machine language. Therefore, the browser engine does not consume much time when analyzing the module, and the analysis speed and the transmission speed of the module are improved.
A specific implementation of the method for uploading medical image files through a browser according to the embodiment of the present application is described in detail below by taking a preset function module as a WebAssembly module as an example.
Referring to fig. 3, a method for uploading a medical image file through a browser according to an embodiment of the present application includes the following steps:
s301: receiving a medical image file uploading request triggered by a user through a browser, wherein the medical image file uploading request carries a folder path where the medical image file is located.
It should be noted that, in order to upload the medical image file through the browser, a user interaction interface for uploading the medical image file is provided in the browser. In the embodiment of the application, a button for uploading files can be arranged on the user interaction interface. When a user wants to upload a medical image file, the user needs to click a button of the uploaded file to trigger a medical image file uploading request, and then a folder path for requesting the user to input the medical image folder stored locally is popped up. After the user inputs the folder path, the browser receives a medical image file uploading request, so as to conveniently search the medical image file to be uploaded, wherein the folder path where the medical image file is located is carried in the medical image file uploading request.
S302: and acquiring a calling function corresponding to a preset function module integrated on the browser according to the uploading request of the medical image file.
As described above, in the embodiment of the present application, in order to enable uploading of a medical image file in a folder form through a browser, a preset function module that enables uploading of the medical image file in the folder form through the browser is integrated into the browser in advance. As an example, the preset function module may be a WebAssembly module. It should be noted that, in the embodiment of the present application, the preset function module is integrated in the browser, and may specifically be stored in a file structure for implementing each function of the browser.
Therefore, in order to facilitate the browser to call the function module in the process of uploading the medical image file in the form of a folder, the embodiment of the application packages a call function of the function module on the browser in advance. It should be noted that, after the browser receives a medical image file uploading request triggered by a user through the browser, the browser obtains a call function corresponding to a preset function module integrated on the browser according to the medical image file uploading request.
As an example, when the preset function module integrated on the browser is a WebAssembly module, the calling function may be a loadWebAssembly calling function.
S303: and calling a preset function module integrated on the browser according to the calling function so as to analyze the preset function module into an example object for uploading the medical image file in a folder form.
As described above, since the call function encapsulated in the browser corresponds to the preset function module integrated in the browser, the preset function module integrated in the browser can be called according to the call function.
As an example, a specific implementation of S303 may include the following steps:
and A1, acquiring a storage path of the preset function module on the browser.
As described above, the preset function module is integrated on the browser, that is, the preset function module is stored in a file structure for implementing each function of the browser. Therefore, in order to call the preset function module, the preset function module needs to be found, and therefore, the browser needs to acquire a storage path of the preset function module on the browser, so that the preset function module is acquired according to the storage path.
And A2, acquiring a file with a text format in a second preset format according to the storage path.
As described above, the file with the text format in the second preset format is the file corresponding to the preset function module. Therefore, acquiring the file is equivalent to acquiring the preset function module.
And A3, converting the file in the second preset format into memory data.
It should be noted that, when a preset function module is called, a code file corresponding to the preset function module needs to be parsed into an instance object. In order to analyze the code file corresponding to the preset function module into an instance object, the file in the second preset format needs to be converted into memory data of the browser.
In addition, in order to cooperate with the application programming interface to enhance the binary processing capability of Javascript, the data structure of the converted memory data may be a buffer array (array buffer).
And A4, compiling and initializing the memory data into an example object for uploading the medical image file through a browser engine.
The step may specifically be: compiling and initializing the memory data into an instance object for realizing uploading of the medical image file by using a WebAssembly. The generated instance object has the functions of uploading files and reading the local memory space and the variable mapping table.
It should be noted that, when the state of WebAssembly () is changed to resolved, the instance object and the compiled WebAssembly module are returned. An instance object may be generated by replacing a source parameter of WebAssembly.
S304: acquiring a folder path where the medical image file is located according to the example object, and acquiring a folder where the medical image file is located according to the medical image file path; and uploading the folder where the medical image file is located to a background server.
In the embodiment of the application, as mentioned above, the medical image file uploading request carries a folder path where the medical image file is located, a calling function for calling a preset function module and the preset function module integrated on the browser have a corresponding relationship, and the preset function module obtains an example object for uploading the medical image file in a folder form after analysis. Therefore, the path of the folder where the medical image file is located can be acquired according to the instance object, and the folder needing to be uploaded is acquired according to the path. Moreover, the parsed instance object has functions of uploading a file, reading a local memory space and a variable mapping table, and therefore, based on the above function of the generated instance object, a specific implementation manner of S304 may include the following steps:
b1: and the instance object reads the folder path where the medical image file carried in the medical image file uploading request is located.
It should be noted that a file reading function is written in the preset function module, and therefore, the instance object obtained by analysis and used for uploading the medical image file also has a corresponding file reading function. When the file reading function runs, the file reading function can read the folder path where the medical image file carried in the medical image file uploading request is located.
B2: and traversing the medical image files in the folder where the medical image files are located, and caching the traversed medical image files into a local memory buffer area.
It should be noted that the medical image file is a binary file, and as an example, the step B2 may specifically be: b21: traversing memory addresses of the medical image files in the folder, and reading bytes corresponding to each medical image file;
b22: and judging whether the file type belongs to the medical image file according to the first n (n is a positive integer) bytes, if so, executing the step B23, and if not, returning to the step B21.
B23: and caching the traversed medical image file into a local memory buffer (buffer).
B3: and sending the medical image file cached in the local memory buffer area to the background server according to a preset data transmission interface connected with the background server so that the background server writes the received medical image file into a newly created folder.
It should be noted that, in the background server, in order to store the medical image file uploaded to the background server, the background server may call an I/O function to create a new folder. The newly created folder can be subjected to binary writing operation, and corresponding data can be written into the folder after the background server receives one piece of medical image file data.
The above is a specific implementation flow of the method for uploading the medical image file through the browser provided by the application. In the specific implementation of the method, a medical image file uploading request triggered by a user through a browser is received, a calling function corresponding to a preset function module integrated on the browser is obtained, and the preset function module integrated on the browser is called according to the calling function so as to be analyzed into an example object for uploading the medical image file in a folder form; finally, acquiring a folder path where the medical image file is located according to the example object, and acquiring the folder where the medical image file is located according to the medical image file path; and uploading the folder where the medical image file is located to a background server. Through the steps, the user can upload the medical image files integrally in a folder form through the browser. In the implementation process, the conversion and processing functions of the preset function module integrated in the browser on the source code uploaded to the medical image file in the form of a folder are fully utilized, and finally, the obtained text format is processed into a binary format close to a machine language. The module has fast analysis speed and transmission speed, so that the browser engine does not consume much time when analyzing the module.
The method for uploading medical images through the browser provided by the above embodiment can be executed by the control device shown in fig. 4. The control device shown in fig. 4 includes a processor (processor)410, a communication Interface (Communications Interface)420, a memory (memory)430, and a bus 440. The processor 410, the communication interface 420, and the memory 430 communicate with each other via a bus 440.
The memory 430 may store logic instructions for uploading the medical image file through the browser, and the memory may be a non-volatile memory (non-volatile memory), for example. The processor 410 may invoke logic instructions in the memory 430 for uploading medical image files via the browser to perform the above-described method for uploading medical image files via the browser. As an embodiment, the logic instruction for uploading the medical image file through the browser may be a program corresponding to the control software, and when the processor executes the instruction, the control device may correspondingly display a functional interface corresponding to the instruction on the display interface.
The function of uploading the logic instructions of the medical image file through the browser can be stored in a computer readable storage medium if the function is implemented in the form of a software functional unit and sold or used as an independent product. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above logic instruction for uploading medical image files via a browser may be referred to as "a device for uploading medical image files via a browser", and the device may be divided into various functional modules. See in particular the examples below.
The following describes a specific implementation of the apparatus for uploading medical image files via a browser according to the embodiment of the present application.
Referring to fig. 5, an apparatus for uploading a medical image file through a browser according to an embodiment of the present application includes the following units:
the receiving unit 51 is configured to receive a medical image file uploading request triggered by a user through a browser, where the medical image file uploading request carries a folder path where a medical image file is located;
a first obtaining unit 52, configured to obtain, according to the medical image file uploading request, a call function corresponding to a preset function module integrated on the browser; the preset function module is used for converting a text format of a source code of the medical image file uploaded in a folder form into a text format which can be supported by a browser and is close to a binary format of a machine language;
a calling unit 53, configured to call a preset function module integrated on the browser according to the calling function, so as to parse the preset function module into an instance object for implementing uploading of a medical image file in a folder form;
a second obtaining unit 54, configured to obtain a folder path where the medical image file is located according to the example object, and obtain a folder where the medical image file is located according to the medical image file path;
and the uploading unit 55 is used for uploading the folder where the medical image file is located to the background server.
Optionally, the apparatus may further include: a module generating unit 56, configured to generate the preset functional module, where fig. 6 is a schematic structural diagram of the module generating unit in an embodiment of the apparatus of the present application. The module generating unit 56 specifically includes:
a first obtaining subunit 561, configured to obtain a source code for implementing uploading of a medical image file in a folder form; the source code can be written using the C language;
a first conversion sub-unit 562 for converting the source code into LLVM bytecode;
a first processing subunit 563 configured to process the LLVM bytecode into a subset of javascript language whose format is a text format in a first preset format;
the second processing subunit 564 is configured to process the subset of the javascript language into a file with a text format in a second preset format; the second preset format is a binary format close to a machine language.
Fig. 7 is a schematic structural diagram of the invoking unit 53 in the embodiment of the apparatus of the present application. The invoking unit 53 specifically includes:
a second obtaining subunit 531, configured to obtain a storage path of the preset function module on the browser;
a third obtaining subunit 532, configured to obtain, according to the storage path, a file with a text format in a second preset format;
a second converting subunit 533, configured to convert the file in the second preset format into memory data;
and the example object generation subunit 534 is configured to compile and initialize the memory data into an example object for uploading the medical image file through the browser engine.
Further, the second acquiring unit 54 may specifically include:
the reading subunit is used for reading the folder path where the medical image file carried in the medical image file uploading request is located;
and the traversal subunit is used for traversing the medical image file in the folder where the medical image file is located and caching the traversed medical image file in a local memory buffer area.
The uploading unit 55 may be specifically configured to send the medical image file cached in the local memory buffer to the background server, so that the background server writes the received medical image file into the newly created folder.
In the above embodiments of the apparatus for uploading medical image files through a browser provided by the present application, persons skilled in the art may clearly understand that, for convenience and brevity of description, specific working processes of the apparatus and units described above may refer to corresponding processes in the foregoing method embodiments, and details are not repeated herein. In the embodiment of the apparatus, the preset function module generated by the module generating unit 56 can convert and process the source code of the medical image file into a binary format close to a machine language, so that a browser does not consume much time when parsing the module.
In a specific structure of the device, a receiving unit 51 is configured to receive a medical image file uploading request triggered by a user through a browser, a first obtaining unit 52 is configured to obtain a calling function corresponding to the medical image file uploading request, and a calling unit 53 is configured to call a preset function module integrated on the browser according to the calling function, so as to parse the preset function module into an example object for implementing uploading of a medical image file in a folder form; the second obtaining unit 54 is configured to obtain a folder path where the medical image file is located according to the instance object, and obtain a folder where the medical image file is located according to the medical image file path; the uploading unit 55 uploads the folder in which the medical image file is located to the background server. Through the functional units, the user can finally upload the medical image files integrally in a folder form through the browser.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a logistics management server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method for uploading medical image files through a browser, the method comprising:
receiving a medical image file uploading request triggered by a user through a browser, wherein the medical image file uploading request carries a folder path where a medical image file is located;
acquiring a calling function corresponding to a preset function module integrated on the browser according to the uploading request of the medical image file; the preset function module is used for converting a text format of a source code of the medical image file uploaded in a folder form into a text format which can be supported by a browser and is close to a binary format of a machine language;
calling a preset function module integrated on the browser according to the calling function so as to analyze the preset function module into an example object for uploading a medical image file in a folder form;
acquiring a folder path where the medical image file is located according to the example object, and acquiring a folder where the medical image file is located according to the medical image file path; and uploading the folder where the medical image file is located to a background server.
2. The method of claim 1, further comprising: the preset function module is generated, and the preset function module is generated,
the generating the preset function module specifically includes:
acquiring a source code for uploading a medical image file in a folder form;
converting the source code into LLVM bytecode;
processing the LLVM bytecode into a subset of javascript language with a text format being a first preset format; the first preset format is a text format which can be identified by a browser;
processing the subset of the javascript language into a file with a text format being a second preset format; the second preset format is a binary format close to a machine language.
3. The method of claim 2, wherein the source code is written in C language.
4. The method according to claim 1, wherein the parsing the preset function module into instance objects for implementing uploading of the medical image file in a folder form specifically comprises:
acquiring a storage path of the preset function module on the browser;
acquiring a file with a text format in a second preset format according to the storage path;
converting the file in the second preset format into memory data;
and compiling and initializing the memory data into an example object for uploading the medical image file through a browser engine.
5. The method according to any one of claims 1 to 4, wherein the folder path where the medical image file is located is obtained according to the instance object, and the folder where the medical image file is located is obtained according to the medical image file path; uploading a folder where the medical image file is located to a background server, which specifically comprises:
reading a folder path where the medical image file carried in the medical image file uploading request is located;
traversing the medical image files in the folder where the medical image files are located, and caching the traversed medical image files into a local memory buffer area;
and sending the medical image file cached in the local memory buffer area to a background server so that the background server writes the received medical image file into a newly created folder.
6. An apparatus for uploading medical image files via a browser, the apparatus comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a medical image file uploading request triggered by a user through a browser, and the medical image file uploading request carries a folder path where a medical image file is located;
the first acquisition unit is used for acquiring a calling function corresponding to a preset function module integrated on the browser according to the uploading request of the medical image file; the preset function module is used for converting a text format of a source code of the medical image file uploaded in a folder form into a text format which can be supported by a browser and is close to a binary format of a machine language;
the calling unit is used for calling a preset function module integrated on the browser according to the calling function so as to analyze the preset function module into an example object for uploading a medical image file in a folder form;
the second acquisition unit is used for acquiring a folder path where the medical image file is located according to the example object and acquiring the folder where the medical image file is located according to the medical image file path;
and the uploading unit is used for uploading the folder where the medical image file is located to the background server.
7. The apparatus of claim 6, further comprising: a module generating unit for generating the preset function module,
the module generating unit specifically includes:
the system comprises a first acquisition subunit, a second acquisition subunit and a third acquisition subunit, wherein the first acquisition subunit is used for acquiring a source code for uploading a medical image file in a folder form;
a first conversion subunit, configured to convert the source code into LLVM bytecode;
the first processing subunit is used for processing the LLVM bytecode into a subset of javascript language with a text format being a first preset format; the first preset format is a text format which can be identified by a browser;
the second processing subunit is used for processing the subset of the javascript language into a file with a text format being a second preset format; the second preset format is a binary format close to a machine language.
8. The apparatus of claim 7, wherein the source code is written in C language.
9. The apparatus according to claim 6, wherein the invoking unit specifically includes:
the second acquiring subunit is used for acquiring a storage path of the preset functional module on the browser;
the third acquiring subunit is used for acquiring a file with a text format in a second preset format according to the storage path;
the second conversion subunit is configured to convert the file in the second preset format into memory data;
and the example object generation subunit is used for compiling and initializing the memory data into the example object for uploading the medical image file through the browser engine.
10. The apparatus according to any one of claims 6 to 9, wherein the second obtaining unit specifically includes:
the reading subunit is used for reading the folder path where the medical image file carried in the medical image file uploading request is located;
the traversal subunit is used for traversing the medical image file in the folder where the medical image file is located and caching the traversed medical image file into a local memory buffer area;
the uploading unit specifically comprises: and sending the medical image file cached in the local memory buffer area to a background server so that the background server writes the received medical image file into a newly created folder.
CN201810299610.4A 2018-04-04 2018-04-04 Method and device for uploading medical image file through browser Active CN108563728B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810299610.4A CN108563728B (en) 2018-04-04 2018-04-04 Method and device for uploading medical image file through browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810299610.4A CN108563728B (en) 2018-04-04 2018-04-04 Method and device for uploading medical image file through browser

Publications (2)

Publication Number Publication Date
CN108563728A CN108563728A (en) 2018-09-21
CN108563728B true CN108563728B (en) 2021-01-19

Family

ID=63534114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810299610.4A Active CN108563728B (en) 2018-04-04 2018-04-04 Method and device for uploading medical image file through browser

Country Status (1)

Country Link
CN (1) CN108563728B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110058904B (en) * 2019-04-24 2023-04-04 广东三维家信息科技有限公司 Data transfer method and device and server
CN110765381B (en) * 2019-10-10 2022-05-24 许昌许继软件技术有限公司 Web publishing method and system of distribution network main station based on WebAssembly technology
CN112951382B (en) * 2021-02-04 2023-09-29 慧影医疗科技(北京)股份有限公司 Anonymous uploading method and system for medical images
CN115116585B (en) * 2022-07-14 2023-10-03 杭州华卓信息科技有限公司 Web-based local DICOM file rendering method and device
CN116319763B (en) * 2023-05-19 2023-08-11 北京长亭科技有限公司 File uploading method and device based on WASM technology

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014154A (en) * 2010-11-05 2011-04-13 山东科技大学 Grid service-based remote sensing image extraction and sharing system and method
CN102932463A (en) * 2012-11-07 2013-02-13 曙光信息产业股份有限公司 Method and system for uploading data
CN103226564A (en) * 2012-01-31 2013-07-31 佳能株式会社 Document management server and document management method
CN104796477A (en) * 2015-04-26 2015-07-22 天津立言科技有限公司 Document uploading method, device and system
CN106878428A (en) * 2017-02-23 2017-06-20 郑州云海信息技术有限公司 Method and device that a kind of file is uploaded

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103593370B (en) * 2012-08-16 2017-08-22 腾讯科技(深圳)有限公司 The method and browser of expanded application are realized in a browser

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014154A (en) * 2010-11-05 2011-04-13 山东科技大学 Grid service-based remote sensing image extraction and sharing system and method
CN103226564A (en) * 2012-01-31 2013-07-31 佳能株式会社 Document management server and document management method
CN102932463A (en) * 2012-11-07 2013-02-13 曙光信息产业股份有限公司 Method and system for uploading data
CN104796477A (en) * 2015-04-26 2015-07-22 天津立言科技有限公司 Document uploading method, device and system
CN106878428A (en) * 2017-02-23 2017-06-20 郑州云海信息技术有限公司 Method and device that a kind of file is uploaded

Also Published As

Publication number Publication date
CN108563728A (en) 2018-09-21

Similar Documents

Publication Publication Date Title
CN108563728B (en) Method and device for uploading medical image file through browser
CN110096338B (en) Intelligent contract execution method, device, equipment and medium
US9804862B2 (en) Translatable texts identification in in-context localization utilizing pseudo-language and an external server
US10594769B2 (en) Selection mapping between fetched files and source files
TWI525543B (en) Hybrid dynamic code compiling device, method, and service system thereof
US20180024848A1 (en) Translatable Texts Identification in In-Context Localization Utilizing Pseudo-Language and an External Server
CA2753626C (en) Packed data objects
CN114153459A (en) Interface document generation method and device
Chiang et al. Bulding a cloud service for medical image processing based on service-orient archtecture
TWI769632B (en) Data segmentation method processor electronic equipment and computer readable storage medium
US20200089477A1 (en) Program optimization by converting code portions to directly reference internal data representations
CN117093316A (en) Cross-platform page rendering system, electronic equipment and storage medium
WO2022068556A1 (en) Code translation method and apparatus, and device
US10656926B2 (en) Compact type layouts
CN113127776A (en) Breadcrumb path generation method and device and terminal equipment
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
JP2012053679A (en) Optimization device, optimization method and compiler program
EP3738028B1 (en) Reduced instructions to generate global variable addresses
CN109408057B (en) Method, device, medium and computing equipment for automatically generating codes
US11281477B2 (en) Assigning computing resources to execution of evaluators for image animation
CN111290757B (en) Weex-based online code compiling method, device and equipment
CN113742385A (en) Data query method and device
US9720660B2 (en) Binary interface instrumentation
Álvarez et al. Towards a deconstructed PACS-as-a-service system
WO2023164897A1 (en) Optimization method and apparatus for binary program

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: 110179 No. 177-1 Innovation Road, Hunnan District, Shenyang City, Liaoning Province

Applicant after: DongSoft Medical System Co., Ltd.

Address before: 110179 No. 177-1 Innovation Road, Hunnan District, Shenyang City, Liaoning Province

Applicant before: Dongruan Medical Systems Co., Ltd., Shenyang

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant