CN109918217A - A kind of control method and terminal - Google Patents

A kind of control method and terminal Download PDF

Info

Publication number
CN109918217A
CN109918217A CN201910217144.5A CN201910217144A CN109918217A CN 109918217 A CN109918217 A CN 109918217A CN 201910217144 A CN201910217144 A CN 201910217144A CN 109918217 A CN109918217 A CN 109918217A
Authority
CN
China
Prior art keywords
terminal
memory
target
free
information
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
CN201910217144.5A
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201910217144.5A priority Critical patent/CN109918217A/en
Publication of CN109918217A publication Critical patent/CN109918217A/en
Pending legal-status Critical Current

Links

Abstract

Present disclose provides a kind of control method and terminals, the described method includes: after first terminal has sent memory sharing request, second terminal is requested in response to the memory sharing that first terminal is sent, obtain the free memory information in second terminal, and the free memory information in second terminal is exported to first terminal, to establish the data connection between first terminal and second terminal, it realizes and target memory corresponding with free memory information in second terminal is shared into first terminal by data connection, to in the case where the memory of first terminal itself is not able to satisfy self-demand, it can use the free memory that the shared memory of second terminal expands first terminal, to meet the use demand of first terminal.

Description

A kind of control method and terminal
Technical field
This disclosure relates to communication-electronics field more particularly to a kind of control method and terminal.
Background technique
Currently, due to terminal size and the difference of application, the terminal price of configuration of the same race is also different.For example, same The mobile phone of memory source and the price difference of laptop are larger, correspondingly, mobile phone and notebook electricity for same price In brain, the memory source of mobile phone is more, and the memory source of laptop is few.
Summary of the invention
In view of this, the disclosure provides a kind of control method and terminal, the memory for solving terminal in the prior art is provided Source is not able to satisfy the problem of self-demand.
Present disclose provides a kind of control methods, comprising:
In response to the memory sharing request that first terminal is sent, the free memory information in second terminal is obtained;
The free memory information is exported to the first terminal, to establish the first terminal and the second terminal Between data connection, target memory corresponding with the free memory information is connected by the data in the second terminal It connects and shares to the first terminal.
Preferably, the free memory information in second terminal is obtained, comprising:
Second terminal is obtained to the history occupied information of memory;
Based on the history occupied information, the free memory information in the second terminal in target time section is obtained.
Preferably, further includes:
Monitor the EMS memory occupation state in the second terminal;
Based on the EMS memory occupation state, the free memory information is updated, and updated free memory information is defeated Out to the first terminal, believe so that the first terminal is shared in the second terminal with the updated free memory The corresponding target memory of manner of breathing.
Preferably, the free memory information obtained in second terminal, comprising:
If the free memory in the second terminal is unsatisfactory for the corresponding request memory of the memory sharing request, sentence Occupancy priority of the first terminal and the second terminal of breaking to memory;
If the priority of the second terminal is higher than the priority of the first terminal, described the is persistently waited until Two terminals release at least partly memory requests institute right so that the free memory in the second terminal meets the memory sharing The request memory answered obtains the free memory information of current idle memory in the second terminal;
If the priority of the first terminal is higher than the priority of the second terminal, the second terminal release is triggered At least partly memory, so that the free memory in the second terminal meets in the corresponding request of the memory sharing request It deposits, obtains the free memory information of current idle memory in the second terminal.
Preferably, further includes:
Obtain the EMS memory occupation request of the second terminal;
If the free memory in the second terminal is unsatisfactory for the corresponding request memory of the EMS memory occupation request, sentence Occupancy priority of the first terminal and the second terminal of breaking to memory;
If the priority of the first terminal is higher than the priority of the second terminal, described the is persistently waited until One terminal discharges at least partly memory in the target memory, so that described in the free memory satisfaction in the second terminal The corresponding request memory of EMS memory occupation request;
If the priority of the second terminal is higher than the priority of the first terminal, the first terminal release is triggered At least partly memory in the target memory is asked so that the free memory in the second terminal meets the EMS memory occupation Seek corresponding request memory.
Preferably, further includes:
Obtain the target data operated to the target memory that the first terminal is sent;
To the target data, data conversion is carried out based on preset translation-protocol;Wherein, the translation-protocol with it is described The attribute of data connection is associated;
The target memory is operated based on the target data after conversion.
Preferably, the target data includes target instruction target word and data content;
Wherein, the target memory is operated based on the target data after conversion, comprising:
Target instruction target word after obtaining conversion;
By the target instruction target word, the data content after conversion is handled in the target memory.
Preferably, the target instruction target word includes at least addressing instruction;
By the target instruction target word, the data content after conversion is handled in the target memory, comprising:
Based on the addressing instruction, destination address is determined in the target memory;
The data content after the conversion is handled in the destination address.
Preferably, the data connection is established based on the wired connection of the first terminal and the second terminal;
The wired connection, for transmitting data and electric energy between the first terminal and the second terminal.
The disclosure additionally provides a kind of terminal, comprising:
Coffret, for receiving the memory sharing request of first terminal transmission;
Memory, for providing memory;
Processor, for obtaining the free memory information in the memory, and can by described in by the coffret It is exported with memory information to the first terminal, with the data connection established between the first terminal and the memory, institute It states in memory target memory corresponding with the free memory information and shares to described first eventually by the data connection End.
It can be seen from the above technical proposal that a kind of control method and terminal, first terminal disclosed in the disclosure have sent After memory sharing request, second terminal is requested in response to the memory sharing that first terminal is sent, and is obtained available in second terminal Memory information, and the free memory information in second terminal is exported to first terminal, to establish first terminal and second terminal Between data connection, realization target memory corresponding with free memory information in second terminal is shared by data connection To first terminal, to can use second terminal in the case where the memory of first terminal itself is not able to satisfy self-demand Shared memory expands the free memory of first terminal, to meet the use demand of first terminal.
Detailed description of the invention
In order to illustrate more clearly of the embodiment of the present disclosure or technical solution in the prior art, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Disclosed some embodiments for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow chart of control method disclosed in the disclosure;
Fig. 2 is the flow chart of another kind control method disclosed in the disclosure;
Fig. 3 is a kind of flow chart for obtaining the free memory information in second terminal disclosed in the disclosure;
Fig. 4, which is that the disclosure is disclosed, shares to first eventually for target memory corresponding with free memory information in second terminal The flow chart of control method behind end;
Fig. 5 is the flow chart that the disclosed response first terminal of the disclosure operates target memory;
Fig. 6 is a kind of structural schematic diagram of terminal disclosed in the disclosure.
Specific embodiment
The terminal price of configuration of the same race is different in the prior art, for example, memory is the laptop of 8G, price is 6 - 7 thousand RMB of thousand RMB, and memory is the mobile phone of 6G, price is only 1,000 RMB or so.It is almost identical due to having The price of the mobile phone of memory source and laptop difference is huge, thus the mobile phone and laptop with regard to same price and It says, the memory source in mobile phone is more, and the memory source in laptop is few, it is seen then that, may for laptop There are problems that memory source is not able to satisfy self-demand.
For the above-mentioned problems in the prior art, the disclosure is used in shared between first terminal and second terminal It deposits, first terminal is allowed to expand free memory by the memory that second terminal is shared, provided with meeting first terminal to memory The use demand in source.
Below in conjunction with the attached drawing in the embodiment of the present disclosure, the technical solution in the embodiment of the present disclosure is carried out clear, complete Site preparation description, it is clear that described embodiment is only disclosure a part of the embodiment, instead of all the embodiments.It is based on Embodiment in the disclosure, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment belongs to the range of disclosure protection.
Specifically, as shown in Figure 1, being applicable to internally deposit into for a kind of control method disclosed in the embodiment of the present disclosure In the terminal of enforcement, such as second terminal, the control method the following steps are included:
S101, it is requested in response to the memory sharing that first terminal is sent, obtains the free memory information in second terminal.
Wherein, it generates in first terminal for the memory sharing request to second terminal request shared drive, and in transmission Sharing request is deposited to second terminal.
A method of generating memory sharing request are as follows: memory sharing is generated based on the input operation that first terminal receives Request.For example, first terminal receives the generation memory being arranged on triggering first terminal by input units such as keyboard or mouses When the menu item or control of sharing request, generates memory sharing request or first terminal receives the touch for meeting preset condition Operation then generates memory sharing request.
Another kind generates the mode of memory sharing request are as follows: based on first terminal in the occupied state generation of current memory Deposit sharing request.Such as, it is more than 90% memory of occupancy to the occupied state of current memory that first terminal, which gets first terminal, State then generates memory sharing request.
It should be noted that second terminal is the terminal for having incidence relation with first terminal, incidence relation can be with are as follows: goes through History established the relationship of the relationship wirelessly or non-wirelessly connected, Bluetooth pairing or wifi connection;Alternatively, incidence relation can be with are as follows: Relationship etc. comprising between same subscriber or terminal user being good friend.Or, second terminal is in first terminal preset range Interior terminal, if second terminal is the terminal in the range of being wirelessly connected or match in first terminal.
Wherein, second terminal can receive the memory that first terminal is sent using wireless communication mode such as bluetooth or wifi etc. Sharing request.
And second terminal obtains available interior in second terminal after receiving the memory sharing request of first terminal transmission Deposit information, free memory information includes at least: the size of free memory and address, free memory here refer to, second terminal In share can be referred to the memory of other terminals, the size of free memory and address: other ends can be shared in second terminal The size of the memory at end and address etc..
In the concrete realization, the free memory information in second terminal includes: size information and the memory of free memory Location information.
It is occupied required for first terminal it should be noted that can specify in the memory sharing request that first terminal is sent Memory size, can not also specified memory size.Correspondingly, second terminal can be based on first terminal institute in the present embodiment The memory size of instruction obtains free memory information (the EMS memory occupation demand that the memory of second terminal meets first terminal), or Person, second terminal can share to the free memory information of the memory of first terminal according to the free memory determination of itself.
S102, the free memory information is exported to the first terminal, to establish the first terminal and described the Data connection between two terminals, target memory corresponding with the free memory information passes through described in the second terminal Data connection shares to the first terminal.
Wherein, free memory information corresponds in second terminal and can share in the target of first terminal in second terminal Deposit, the size of the target memory and address in free memory size and address it is consistent.As a result, in the present embodiment, second Terminal exports free memory information to after first terminal, first terminal can be determined according to free memory information with The target memory that first terminal can occupy, and then first terminal can be occupied by the data connection established between second terminal Target memory in second terminal, to meet in first terminal the needs of to memory.
It should be noted that free memory information can be transferred to by second terminal by wirelessly or non-wirelessly equal communication modes First terminal, to establish the data connection between first terminal and second terminal.Wherein, the mode of data connection is established are as follows: base Data connection is established in the wired connection of first terminal and second terminal.The wired connection of foundation is in addition to can be used for first eventually Data are transmitted between end and second terminal, wired connection can be used for transmitting electric energy between first terminal and second terminal, To realize the bidirectional power supply between first terminal and second terminal.
For example, first terminal can be laptop, second terminal can be mobile phone, pass through between mobile phone and notebook Data line is connected, and by the data line notebook can be mobile phone charging or mobile phone is notebook charging, meanwhile, by this Data line mobile phone can be that notebook shares mobile phone EMS memory or notebook can be this memory of mobile phone shared note.
Wherein, the wired connection between first terminal and second terminal can be with are as follows: serial wired connection is parallel wired Connection etc..
Specifically, can be matched based on hardware provided by first terminal and second terminal between first terminal and second terminal It sets selection and establishes data connection appropriate, can also establish based on the demand to message transmission rate and can satisfy data transmission The data connection of rate.Illustratively, second terminal is mobile phone, has type-C interface, first terminal is laptop, then The wired connection between mobile phone and laptop is established using type-C data line.Wherein, it is established based on type-C data line Data connection, message transmission rate is high compared to the message transmission rate of other serial wired connections, can satisfy high data The demand of transmission rate.
In other embodiments, general-purpose serial bus USB (Universal Serial Bus) data line can also be utilized Establish the serial wired connection between mobile phone and laptop.Correspondingly, after establishing data connection between mobile phone and notebook, Mobile phone is based on data connection and target memory corresponding with free memory information is shared to notebook.
As it can be seen that the memory that second terminal is sent in response to first terminal is total in the control method that the embodiment of the present disclosure proposes Request is enjoyed, obtains the free memory information in second terminal, and the free memory information in second terminal is exported to first eventually The data connection between first terminal and second terminal is established at end, and realization will be corresponding with free memory information in second terminal Target memory first terminal is shared to by data connection, so that the memory in first terminal itself is not able to satisfy self-demand In the case where, it can use the free memory that the shared memory of second terminal expands first terminal, to meet making for first terminal Use demand.
Present embodiment discloses another control method, the present embodiment is in place of being different from embodiment illustrated in fig. 1, this reality Apply the mode be described in detail in example and obtain the free memory information in second terminal.
Shown in Figure 2, the method for the present embodiment specifically includes:
S201, it is requested in response to the memory sharing that first terminal is sent, obtains second terminal and letter is occupied to the history of memory Breath.
Wherein, the history occupied information of memory refers to second terminal to the history use information of self EMS memory resource, packet Include EMS memory occupation time, EMS memory occupation size and EMS memory occupation address.
Specifically, second terminal can determine second terminal by obtaining second terminal to the history occupied information of memory The memory size and memory address for needing to occupy in special time period, so that it is determined that memory size idle in second terminal And memory address, for example, by the memory size for needing to occupy in special time period in second terminal and memory address it Other outer memories are determined as idle memory, to determine that other can be shared to from memory idle in second terminal The size and memory address of the memory of terminal.
S202, it is based on the history occupied information, obtains in the second terminal and believes in the free memory of target time section Breath.
Wherein, target time section refers to the period of the preset duration since the system current time of second terminal, or Person, first terminal period etc. specified in memory sharing request.Wherein, the system current time of second terminal refers to At the time of being the memory sharing request for receiving first terminal transmission.
It should be noted that preset duration, which can be finite value, is also possible to infinitely great numerical value.Such as, preset duration 1 A hour, the system current time of second terminal are 9 o'clock sharp of the morning, then, target time section is 9 points to 10 points this hours Period.Preset duration is infinity, and the system current time of second terminal is 9 o'clock sharp of the morning, then, target time section is 9 points of later periods of the morning.
Second terminal is based on history occupied information after target time section has been determined, second is whole in exclusion target time section The memory size and memory address that can be occupied are held, by the size of memory all or part of in the remaining memory of second terminal And address is as the free memory information in target time section.
S203, the free memory information is exported to the first terminal, to establish the first terminal and described the Data connection between two terminals, target memory corresponding with the free memory information passes through described in the second terminal Data connection shares to the first terminal.
The implementation of this step is similar with the implementation of step S102 in a upper embodiment, and details are not described herein again.
In one implementation, the information of second terminal committed memory can change, and be not completely and history Occupied information is identical, and e.g., second terminal is newly mounted with application program, then it is certain necessarily to cause the application program newly installed to occupy Memory, and then the free memory information in second terminal is impacted.In the presence of the second terminal for predicting or detecting In the corresponding target memory of free memory information in the target time period become not available problem.
In view of the above-mentioned problems, the present embodiment is after obtaining the free memory information in second terminal, or by second It further include dynamic adjustment second terminal after target memory corresponding with free memory information shares to first terminal in terminal In free memory information operation.
A method of realizing the free memory information in dynamic adjustment second terminal are as follows:
EMS memory occupation state in S204, the monitoring second terminal.
Wherein, the EMS memory occupation state in second terminal can be monitored in the present embodiment according to the fixed cycle, and in record Deposit occupied state.EMS memory occupation state include by the memory size until the currently monitored moment, occupied in second terminal with And the memory address occupied.
S205, it is based on the EMS memory occupation state, updates the free memory information, and updated free memory is believed Breath output to the first terminal so that the first terminal share in the second terminal with it is described it is updated it is available in Deposit the corresponding target memory of information.
Wherein, second terminal can be according to the EMS memory occupation state monitored, and dynamic adjusts the free memory of second terminal Information such as increases or decreases the memory size in free memory information, the corresponding memory address modified in free memory information, or Person, the memory size in free memory information is constant, changes the memory address, etc. in free memory information.
For example, in one implementation, second terminal determines the memory address and free memory occupied in second terminal There is the memory address of overlapping in memory address in information, then, second terminal by free memory information with EMS memory occupation shape The identical memory address removal in the committed memory address for including in state, remaining memory address are free memory information, realization pair The update for the free memory information determined in step S202 executes step S203 later, realizes updated free memory Information is exported to the first terminal so that the first terminal it is shared occupy in the second terminal with it is described updated The corresponding target memory of free memory information.
Optionally, after the EMS memory occupation state in second terminal is monitored in step S204, it is internal to update second terminal The history occupied information deposited, to be obtained in second terminal according to newest history occupied information in target time section next time Free memory information.
In one implementation, in first terminal request second terminal in the case where memory, there are in second terminal Free memory size be not able to satisfy the corresponding request memory of first terminal memory sharing request, e.g., first terminal memory is total The memory for requesting to save as that size is 1G in corresponding request is enjoyed, still, the memory of the free memory in the second terminal of acquisition is big Small is 600M, is not able to satisfy first terminal memory sharing and requests corresponding request memory.
For this case, present embodiment discloses another realization sides for obtaining the free memory information in second terminal Formula.
It is shown in Figure 3, comprising:
If the free memory in S301, second terminal is unsatisfactory for the corresponding request memory of the memory sharing request, Judge the first terminal and second terminal to the occupancy priority of memory.
Wherein, after the memory sharing that second terminal receives first terminal transmission is requested, it is right to obtain memory sharing request institute Request memory information such as size answered etc., and obtain size and the address of free memory in second terminal.In turn, second terminal Judge whether the size of free memory in second terminal is greater than or equal to the size that memory sharing requests corresponding request memory:
If it is determined that the size of free memory is greater than or equal to the corresponding request memory of memory sharing request in second terminal Size, then illustrate in second terminal that there are enough memory headrooms to share to first terminal use, it is total to can satisfy memory Enjoy the corresponding request memory of request;
And if it is determined that the size of free memory requests the big of corresponding request memory less than memory sharing in second terminal Small, then the memory for illustrating that free memory is not able to satisfy first terminal request in second terminal needs to judge first in such cases Terminal and second terminal preferentially use memory to the occupancy priority of memory to determine which terminal has according to occupancy priority Right, and limited Memory Allocation is given and is used with the preferential terminal using memory right.
Wherein, first terminal and second terminal can be to be stored in advance or be arranged second to the occupancy priority of memory In terminal and first terminal.
If the priority of S302, the second terminal is higher than the priority of the first terminal, institute is persistently waited until Second terminal release at least partly memory is stated, so that the free memory in the second terminal meets the memory sharing request Corresponding request memory obtains the free memory information of current idle memory in the second terminal.
Wherein, if it is determined that the free memory in second terminal is unsatisfactory for the corresponding request memory of memory sharing request, And the priority of second terminal is higher than the priority of first terminal, then second terminal has the preferential right for using self EMS memory, In such cases, although receiving the memory sharing request of first terminal, since the free memory in second terminal cannot Meet memory sharing and request corresponding request memory, therefore lasting waiting is until second terminal is finished using memory and is discharged at least After partial memory, so that the free memory in second terminal increases, and the free memory increased meets memory sharing request and corresponds to Request memory, at this point, obtaining free memory information from the current free memory of second terminal.
If the priority of S303, the first terminal is higher than the priority of the second terminal, described second is triggered eventually End release at least partly memory, so that the free memory in the second terminal meets corresponding to the memory sharing request Memory is requested, the free memory information of current idle memory in the second terminal is obtained.
Wherein, if it is determined that the free memory in second terminal is unsatisfactory for the corresponding request memory of memory sharing request, And the priority of first terminal is higher than the priority of second terminal, then first terminal has preferential using memory in second terminal Right, in such cases, after the memory sharing request for receiving first terminal, directly in the release at least partly of triggering second terminal It deposits, the free memory to increase the free memory in second terminal, and after increase, which meets memory sharing, requests corresponding request After memory, free memory information is obtained from the current idle memory of second terminal.
Based on above scheme, in the present embodiment in the case where first terminal requests memory in shared second terminal, if the The memory sharing of one terminal request and second terminal to the use of self EMS memory deposit in the case of a conflict, according to first terminal with Second terminal determines to the occupancy priority of memory and occupies the high terminal of priority, and memory is first distributed to occupancy priority High terminal, with reasonable distribution memory.
In practical applications, second terminal response first terminal send memory sharing request, i.e., by second terminal with After the corresponding target memory of free memory information shares to first terminal, can exist in second terminal normal course of operation to memory Occupancy request, can exist used the memory sharing of itself to first terminal due to second terminal in such cases, lead to the Current idle memory is not able to satisfy itself occupancy demand to memory in two terminals.Such as, memory sharing is given first by second terminal After terminal, the size of current idle memory is 600M, but second terminal needs to install new application program, needs to occupy 1G's Memory, so that second terminal current idle memory is not able to satisfy the demand that second terminal installs new application program.
In view of the above-mentioned problems, the memory sharing request that second terminal response first terminal is sent in the present embodiment, by second It is shown in Figure 4 after target memory corresponding with free memory information shares to first terminal in terminal, further includes:
S401, the EMS memory occupation request for obtaining the second terminal.
One kind is the input operation life received based on second terminal in the mode that second terminal generates EMS memory occupation request It is requested at EMS memory occupation.It such as receives the menu item for the generation memory sharing request being arranged in triggering second terminal, receive completely The touch operation of sufficient preset condition or the operation for receiving installation application program then generate EMS memory occupation request.
Another kind, generating the mode of EMS memory occupation request in second terminal is based on second terminal to the occupancy of current memory State generates EMS memory occupation request.Such as, getting second terminal is more than occupying 90% memory to the occupied state of current memory State, then generate EMS memory occupation request.
If the free memory in S402, the second terminal is unsatisfactory in the corresponding request of the EMS memory occupation request It deposits, judges the first terminal and second terminal to the occupancy priority of memory.
Wherein, in the present embodiment, after obtaining EMS memory occupation request, request memory letter corresponding with EMS memory occupation request is obtained Breath such as requests memory size, and obtains the free memory in second terminal.
Later, determine whether the size of free memory in second terminal is greater than or equal to EMS memory occupation request in the present embodiment The size of corresponding request memory:
If it is determined that the size of free memory is greater than or equal to the corresponding request memory of EMS memory occupation request in second terminal Size, then illustrate in second terminal there are enough memory headrooms for second terminal occupancy, EMS memory occupation can be met Request corresponding request memory.
If it is determined that the size of free memory is less than the size that EMS memory occupation requests corresponding request memory in second terminal, Then illustrate that free memory is not able to satisfy the corresponding request memory of EMS memory occupation request in second terminal.In such cases, it needs to sentence Disconnected first terminal and second terminal preferentially make the occupancy priority of memory to determine which terminal has according to occupancy priority With the right of memory, and limited Memory Allocation is given and is used with the preferential terminal using memory right.
If the priority of S403, the first terminal is higher than the priority of the second terminal, institute is persistently waited until It states first terminal and discharges at least partly memory in the target memory, so that the free memory in the second terminal meets The corresponding request memory of the EMS memory occupation request.
Wherein, how to determine that the free memory in second terminal is unsatisfactory for corresponding to EMS memory occupation request in the present embodiment Request memory, and the priority of first terminal is higher than the priority of second terminal, then first terminal has preferential whole using second The right of memory in end, in such cases, although the EMS memory occupation request of second terminal is obtained, however, it is desirable to wait first The memory that terminal is shared using second terminal is finished, after at least partly memory is discharged after first terminal use, so that Free memory in second terminal increases, and the free memory after increase meets EMS memory occupation and requests corresponding request memory Afterwards, it is supplied to second terminal and request is occupied with response memory.
If the priority of S404, the second terminal is higher than the priority of the first terminal, described first is triggered eventually End discharges at least partly memory in the target memory, so that the free memory in the second terminal meets the memory Occupy the corresponding request memory of request.
Determine that the free memory in second terminal is unsatisfactory for the corresponding request memory of EMS memory occupation request, and second terminal Priority be higher than the priority of first terminal, then second terminal has the preferential right for using self EMS memory, in such cases, After getting the EMS memory occupation request of second terminal, directly the second terminal of triggering first terminal release busy is at least partly interior It deposits, the free memory to increase the free memory in second terminal, and after increase, which meets EMS memory occupation, requests corresponding request After memory, second terminal is supplied to response memory and occupies request.
Based on above scheme, in the present embodiment by memory sharing in second terminal to first terminal use after, if second Terminal deposits in the case of a conflict the use of self EMS memory and first terminal between the use of shared memory, according to first Terminal and second terminal determine to the occupancy priority of memory and occupy the high terminal of priority, and memory is first distributed to occupancy The high terminal of priority, with reasonable distribution memory.
In one implementation, target memory corresponding with free memory information in second terminal is being passed through into data It further include responding first terminal to the operating procedure of target memory in the present embodiment after connection shares to first terminal.Referring to Fig. 5 It is shown, the step of operation for response first terminal to target memory.
S501, the target data operated to the target memory that the first terminal is sent is obtained.
Wherein, operation here may include read operation, write operation etc..For read operation, target data is referred to from mesh The data read in mark memory;For write operation, target data refers to that first terminal needs to be written in target memory Data, e.g., file etc. to be stored.
S502, to the target data, data conversion is carried out based on preset translation-protocol;Wherein, the translation-protocol It is associated with the attribute of the data connection.
For example, first terminal is mobile phone, second terminal is laptop, alternatively, first terminal is laptop, the Two terminals are mobile phone, and usually mobile phone is Android system, ios system, and laptop is window system, mobile phone and notebook The operating system of computer is different, and needs to carry out data to the target data that first terminal is sent based on preset translation-protocol Conversion, so that the second terminal with different operating system can identify target data.
Wherein, preset translation-protocol is associated with the attribute of data connection.Data connection includes parallel connection, string Row connection, the attribute of parallel connection be it is parallel, the attribute of serial connection is serial.
If the data connection of foundation is the serial connection established using type-C, then preset translation-protocol is and serial phase Associated translation-protocol is decoded based on target data of the type-C decoder to the type-C format that first terminal is sent and is turned It changes, to be converted to the data format that second terminal can recognize that.
S503, the target memory is operated based on the target data after conversion.
Optionally, target data includes target instruction target word and data content.Data content includes in specific data to be operated Hold, and target instruction target word includes at least the addressing instruction for determining target memory address.
It wherein, include target instruction target word and data content in the target data after conversion, either target instruction target word still counts According to content, data format is all identical as the data format that second terminal can recognize that.As a result, from the target data after conversion The middle target instruction target word obtained after conversion, and the data content after conversion is handled in target memory by target instruction target word.
By taking target instruction target word is addressing instruction as an example, after getting addressing instruction in the target data after conversion, in target Destination address is determined in memory, and data content is handled in destination address.As by data content with being written to target Location, or data content is read from destination address.
Corresponding control method disclosed above, the embodiment of the present disclosure provides a kind of terminal, shown in Figure 6, the terminal Include:
Coffret 601, memory 602 and processor 603.
Wherein, coffret 601, such as wired coffret or wireless transmission interface are sent for receiving first terminal Memory sharing request;
Memory 602, for providing memory;
Processor 603 for obtaining the free memory information in the memory 602, and passes through the coffret 601 The free memory information is exported to the first terminal, to establish between the first terminal and the memory 602 Data connection, target memory corresponding with the free memory information is total by the data connection in the memory 602 It enjoys to the first terminal.
Wherein, the terminal in the present embodiment can be understood as second terminal hereinbefore, specific structure and implementation Can be with reference to corresponding contents above, and will not be described here in detail.
In specific application scenarios, terminal can be mobile phone, and first terminal can be laptop, same price The memory source of mobile phone and laptop, mobile phone is more, and the memory source of laptop is few, in order to enable laptop With more memory source, then the cost of laptop can be obviously increased.And in the present embodiment, using will be in mobile phone It deposits and shares to laptop use, to expand memory source workable for laptop, not only can satisfy notebook electricity Demand of the brain to memory source, simultaneously as laptop free memory increases the processing speed therefore improved to data, And the cost of laptop will not be improved.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part It is bright.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of the present disclosure.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments makes professional and technical personnel in the field can be realized or use the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or the scope of the present disclosure.Therefore, the disclosure It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (10)

1. a kind of control method, comprising:
In response to the memory sharing request that first terminal is sent, the free memory information in second terminal is obtained;
The free memory information is exported to the first terminal, to establish between the first terminal and the second terminal Data connection, target memory corresponding with the free memory information is total by the data connection in the second terminal It enjoys to the first terminal.
2. according to the method described in claim 1, obtaining the free memory information in second terminal, comprising:
Second terminal is obtained to the history occupied information of memory;
Based on the history occupied information, the free memory information in the second terminal in target time section is obtained.
3. according to the method described in claim 1, further include:
Monitor the EMS memory occupation state in the second terminal;
Based on the EMS memory occupation state, update the free memory information, and by updated free memory information export to The first terminal so that the first terminal share in the second terminal with the updated free memory information phase Corresponding target memory.
4. according to the method described in claim 1, the free memory information obtained in second terminal, comprising:
If the free memory in the second terminal is unsatisfactory for the corresponding request memory of the memory sharing request, institute is judged First terminal and second terminal are stated to the occupancy priority of memory;
If the priority of the second terminal is higher than the priority of the first terminal, persistently wait until that described second is whole End release at least partly memory, so that the free memory in the second terminal meets corresponding to the memory sharing request Memory is requested, the free memory information of current idle memory in the second terminal is obtained;
If the priority of the first terminal is higher than the priority of the second terminal, the second terminal release is triggered at least Partial memory, so that the free memory in the second terminal meets the corresponding request memory of the memory sharing request, Obtain the free memory information of current idle memory in the second terminal.
5. according to the method described in claim 1, further include:
Obtain the EMS memory occupation request of the second terminal;
If the free memory in the second terminal is unsatisfactory for the corresponding request memory of the EMS memory occupation request, institute is judged First terminal and second terminal are stated to the occupancy priority of memory;
If the priority of the first terminal is higher than the priority of the second terminal, persistently wait until that described first is whole End discharges at least partly memory in the target memory, so that the free memory in the second terminal meets the memory Occupy the corresponding request memory of request;
If the priority of the second terminal is higher than the priority of the first terminal, trigger described in the first terminal release At least partly memory in target memory, so that the free memory in the second terminal meets EMS memory occupation request institute Corresponding request memory.
6. according to the method described in claim 1, further include:
Obtain the target data operated to the target memory that the first terminal is sent;
To the target data, data conversion is carried out based on preset translation-protocol;Wherein, the translation-protocol and the data The attribute of connection is associated;
The target memory is operated based on the target data after conversion.
7. according to the method described in claim 6, the target data includes target instruction target word and data content;
Wherein, the target memory is operated based on the target data after conversion, comprising:
Target instruction target word after obtaining conversion;
By the target instruction target word, the data content after conversion is handled in the target memory.
8. according to the method described in claim 7, the target instruction target word includes at least addressing instruction;
By the target instruction target word, the data content after conversion is handled in the target memory, comprising:
Based on the addressing instruction, destination address is determined in the target memory;
The data content after the conversion is handled in the destination address.
9. according to the method described in claim 1, the data connection having based on the first terminal and the second terminal Line connection is established;
The wired connection, for transmitting data and electric energy between the first terminal and the second terminal.
10. a kind of terminal, comprising:
Coffret, for receiving the memory sharing request of first terminal transmission;
Memory, for providing memory;
Processor, for obtaining the free memory information in the memory, and can be in by described in by the coffret Information is deposited to export to the first terminal, it is described to deposit with the data connection established between the first terminal and the memory Target memory corresponding with the free memory information shares to the first terminal by the data connection in reservoir.
CN201910217144.5A 2019-03-21 2019-03-21 A kind of control method and terminal Pending CN109918217A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910217144.5A CN109918217A (en) 2019-03-21 2019-03-21 A kind of control method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910217144.5A CN109918217A (en) 2019-03-21 2019-03-21 A kind of control method and terminal

Publications (1)

Publication Number Publication Date
CN109918217A true CN109918217A (en) 2019-06-21

Family

ID=66966109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910217144.5A Pending CN109918217A (en) 2019-03-21 2019-03-21 A kind of control method and terminal

Country Status (1)

Country Link
CN (1) CN109918217A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110392346A (en) * 2019-07-30 2019-10-29 Oppo(重庆)智能科技有限公司 Record method, mobile terminal, the computer storage medium of parking position
WO2024067519A1 (en) * 2022-09-29 2024-04-04 维沃移动通信有限公司 Indication method, and first device and second device

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1605060A (en) * 2001-12-17 2005-04-06 国际商业机器公司 Automatic data interpretation and implementation using performance capacity management framework over many servers
CN101158927A (en) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 EMS memory sharing system, device and method
US20100042801A1 (en) * 2008-08-18 2010-02-18 Samsung Electronics Co., Ltd. Apparatus and method for reallocation of memory in a mobile communication terminal
CN105094997A (en) * 2015-09-10 2015-11-25 重庆邮电大学 Method and system for sharing physical memory among cloud computing host nodes
CN106021130A (en) * 2016-05-10 2016-10-12 北京小米移动软件有限公司 Memory processing method and device
CN106095694A (en) * 2016-06-15 2016-11-09 华为技术有限公司 Date storage method and device
US20170004109A1 (en) * 2013-12-30 2017-01-05 International Business Machines Corporation Remote direct memory access (rdma) high performance producer-consumer message processing
CN106844032A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies
CN107911420A (en) * 2017-10-27 2018-04-13 智慧海派科技有限公司 A kind of method and system that shared memory is established between intelligent terminal
CN108039082A (en) * 2017-12-07 2018-05-15 浙江海洋大学 A kind of bathyscaph retractable operation Simulated training training method based on LAN
CN109213539A (en) * 2016-09-27 2019-01-15 华为技术有限公司 A kind of method for recovering internal storage and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1605060A (en) * 2001-12-17 2005-04-06 国际商业机器公司 Automatic data interpretation and implementation using performance capacity management framework over many servers
CN101158927A (en) * 2007-10-25 2008-04-09 中国科学院计算技术研究所 EMS memory sharing system, device and method
US20100042801A1 (en) * 2008-08-18 2010-02-18 Samsung Electronics Co., Ltd. Apparatus and method for reallocation of memory in a mobile communication terminal
US20170004109A1 (en) * 2013-12-30 2017-01-05 International Business Machines Corporation Remote direct memory access (rdma) high performance producer-consumer message processing
CN105094997A (en) * 2015-09-10 2015-11-25 重庆邮电大学 Method and system for sharing physical memory among cloud computing host nodes
CN106021130A (en) * 2016-05-10 2016-10-12 北京小米移动软件有限公司 Memory processing method and device
CN106095694A (en) * 2016-06-15 2016-11-09 华为技术有限公司 Date storage method and device
CN109213539A (en) * 2016-09-27 2019-01-15 华为技术有限公司 A kind of method for recovering internal storage and device
CN106844032A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 The storage processing method and device of a kind of terminal applies
CN107911420A (en) * 2017-10-27 2018-04-13 智慧海派科技有限公司 A kind of method and system that shared memory is established between intelligent terminal
CN108039082A (en) * 2017-12-07 2018-05-15 浙江海洋大学 A kind of bathyscaph retractable operation Simulated training training method based on LAN

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
褚瑞,张一鸣: "《基于虚拟计算环境的内存共享技术》", 31 December 2010 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110392346A (en) * 2019-07-30 2019-10-29 Oppo(重庆)智能科技有限公司 Record method, mobile terminal, the computer storage medium of parking position
CN110392346B (en) * 2019-07-30 2021-03-19 Oppo(重庆)智能科技有限公司 Method for recording parking position, mobile terminal, computer storage medium
WO2024067519A1 (en) * 2022-09-29 2024-04-04 维沃移动通信有限公司 Indication method, and first device and second device

Similar Documents

Publication Publication Date Title
KR102203247B1 (en) Wireless battery management apparatus and battery pack including the same
JP5989249B2 (en) Reducing wireless reconnection time for computing devices
CN101615067B (en) Coordinated link power management
US8601137B2 (en) Method of creating and managing session between wireless universal serial bus host and wireless universal serial bus device and providing wireless universal serial bus host and wireless universal serial bus device
CN103294339B (en) Image display device and control method thereof
CN105338052B (en) Method and apparatus for synchronizing applications of electronic devices
CN109075588B (en) Electronic device and method for charging battery
CN103716390A (en) Method and terminal for data sharing
US20160055082A1 (en) Memory allocating method and electronic device supporting the same
CN109918217A (en) A kind of control method and terminal
US10509723B1 (en) Expedited cache destage for power interruption in a virtual storage appliance
CN110609738A (en) Adaptive data synchronization
US20100207585A1 (en) Reserving power for electronic devices
CN104767788A (en) METHOD AND SYSTEM using applications on mobile devices
KR20160052105A (en) Method for transmitting and receiving data and Electronic device using the same
CN112701738A (en) Charging method, charging device and electronic equipment
CN112788585B (en) NF (NF) switching method and device in 5G core network and storage medium
WO2021147620A1 (en) Communication method, device, and system based on model training
EP2512035A1 (en) Smart card-based widget service system and method, and a smart card applied thereto
JP7151240B2 (en) system
JP6486204B2 (en) Control system, server, and control method
CN104052776B (en) VM starting-up methods, VMM, shared memory systems, VDI systems and physical host
CN106027309B (en) The acquisition methods and device of device status information
JP4289892B2 (en) Wireless system, wireless terminal communication mode control method, control program for executing the control method, and storage medium storing the control program
GB2494858A (en) Managing connections to a network in a mobile 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190621